Functions for currency values
The following functions can be used for currencies:
| Function | Description | Syntax |
|---|---|---|
base_amount_of
|
Result is base amount value from a currency function or currency object
field. If the first argument is a list of currency values, the result is a list of base amounts. |
Examples:
base_amount_of([$field
group:field name$])
|
base_code_of
|
Result is base currency code from a currency function or currency object
field. If the first argument is a list of currency values, the result is a list of currency codes. |
Example: base_code_of([$field
group:field name$])
|
currency
|
Result is a representation of a currency amount, currency code, and exchange rate, where
exchangeRate is optional. If omitted, the existing exchange rate for the currency
is used. If the first argument is a list of integer or decimal values, the result is a list of currency values. |
Examples:
|
local_amount_of
|
Result is local amount value from a currency function or object field. If the first argument is a list of currency values, the result is a list of local amounts. |
Example: local_amount_of([$field
group:field name$])
|
local_code_of
|
Result is local currency code from a currency function or object field.
If the first argument is a list of currency values, the result is a list of currency codes. |
Example: local_code_of([$field
group:field name$])
|
ex_rate_of
|
Result is exchange rate from a currency function or object field. |
Example: ex_rate_of([$field
group:field name$])
|
system_ex_rate_of
|
Result is the system exchange rate, either current or for a specific date. Can have one or two arguments. Argument one is a currency code and two is a date. If currency code is given, result is the current system exchange rate for that currency. If two arguments are given, result is the system exchange rate for a currency code on a given date. |
Example:
|
Examples:
| Expression | Result | Note |
|---|---|---|
currency (1500, 'USD') + currency (150000.00, 'JPY',0.01)
|
local Currency
=USD
|
|
format (currency (1500, 'USD') + currency (150000.00, 'JPY',0.01))
|
USD 3,000.00
|