FormattedValue property

NumberField.FormattedValue — Text

The value of the number field, formatted as a text string. The formatted value is identical to the value displayed in the app itself.

The formatted value takes into account the formatting options of the field, including whether thousands separators should be used and the configured number of decimal places. It also takes the language of the app into account, meaning that the decimal separator and thousands separator are appropriate for the configured language. Formatting options for a field and the language of the app are set through Calcapp Creator's inspector.

The formatted value of a number field incorporates the leading unit of the field (often used for currency symbols like "$") and the trailing unit (often used for units like "kg" and "lbs").

Numbers can also be formatted through the FIXED, FORMATNUMBER, FORMATPERCENTAGE, FORMATFRACTION and FORMATSCIENTIFIC functions. The advantage to using a function is that the formatting options can be set in the formula itself.

This property is a read-only property, meaning that no formula can be assigned to it.

Examples

NumberField1.FormattedValueNumberField1,FormattedValue

Returns a formatted version of the value of NumberField1, which exactly matches what is displayed in the app. The formatting settings of NumberField1 are used.

FORMATNUMBER(NumberField1)FORMATNUMBER(NumberField1)

Returns a formatted version of the value of NumberField1, using the default settings of FORMATNUMBER (two decimal places are used as well as thousands separators).

FORMATNUMBER({ NumberField1, NumberField2 })FORMATNUMBER({ NumberField1; NumberField2 })

Returns an array containing formatted versions of the values of NumberField1 and NumberField2. The default settings of FORMATNUMBER are used (two decimal places are used as well as thousands separators).