KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Programmatically Set Currency Format for a Column in 4D View Pro
PRODUCT: 4D View Pro | VERSION: 20 | PLATFORM: Mac & Win
Published On: October 9, 2023

Often times a developer may be working with numeric values within a 4D View Pro Area. How can we format these values to look like USD currency?
Let's take a look at the table provided below.

Example:




By calling the "ViewProArea", specifying a column, and a formatter, we can style the Salary column with the following code:

VP SET CELL STYLE(VP Column("ViewProArea"; 3); {formatter: "_($ #,##0.00_)"})


Notice, the VP SET CELL STYLE command is used along side the VP Column command to reference the 3rd column of the Table.

Formatted Example: