Currency
The Currency data type is a signed, numeric, fixed-point 64-bit number with 4 decimals. Values range from -922 337 203 685 477.5808 to 922 337 203 685 477.5808. This data type is routinely used for financial calculations: it is as precise as integers.
Defining Currency values
- Preprocessor:
- In the Step properties pane, under Properties, add or select a field.
- Specify the Type as Currency and set a default value as a number with up to 4 decimal points, followed by a semicolon; such as
546513.8798;
- Extraction:
- In the Data Model, select a field.
- On the Step properties pane, under Field Definition set the Type to Currency.
- Under Data Format, specify how the value is formatted in the data source (see Extract step properties; for the default format settings, see Data source settings).
- JavaScript Expression: Set the desired value to any Float value. Example:
record.fields["PreciseTaxSubtotal"] = 27.13465;
While Currency values can be set to up to 4 significant digits, only 2 are displayed on screen.
Building Currency values
Currency values can be the result of direct attribution or mathematical operations just like Integer values (see Integer).