Functions for currency values

Functions for currency values can be used in expressions.

The following functions can be used for currencies:

Table 1. Functions 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.

base_amount_of(currencyResult)

Examples:

base_amount_of ( currency ( 1000.0 , 'EUR', 1.1 ) )

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.

base_code_of(currencyResult)

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.

currency(amount, currencyCode, exchangeRate)

Examples:

currency(1800000, 'JPY',0.01)

currency(3500.00, 'USD')

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.

local_amount_of(currencyResult)

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.

local_code_of(currencyResult)

Example:

local_code_of([$field group:field name$])
ex_rate_of Result is exchange rate from a currency function or object field.

ex_rate_of(currencyResult)

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.

system_ex_rate_of( currencyCode, date)

Example:

system_ex_rate_of('USD', 2025-12-01)

system_ex_rate_of('USD')

Examples:

Table 2. Examples of expressions that use currencies
Expression Result Note
currency (1500, 'USD') + currency (150000.00, 'JPY',0.01) local Currency =USD

exchangeRate=1.0

baseAmount=3000.0

baseCurrency=USD

localAmount=3000.0

 
format (currency (1500, 'USD') + currency (150000.00, 'JPY',0.01)) USD 3,000.00