Reference > Expressions > Built-in Functions > Numeric and Currency Functions > CurrencyCode

CurrencyCode

Returns the currency code of a currency value. A currency value is a combination of the currency amount and the currency code, such as 3 USD.

  • Use this function to return the currency code portion of a currency value.
  • Use the CurrencyValue function to return the currency amount portion of a currency value.

Syntax

CurrencyCode(currencyValue)

Enabled for

Search/Dashboard No
Business Rules Yes
Quick Actions Yes
Workflow Objects Yes
Reports No

Parameter

currencyValue The currency value (a combination of the currency amount and the currency code, such as 3 USD) from which to extract the currency code.

Return Value

Text value. Returns the currency code of the currency value that was input. See http://www.xe.com/iso4217.php for a list of ISO 4217 currency codes.

Returns null if the currencyValue parameter is null.

Examples

$(CurrencyCode(44.2HKD)

The example above returns "HKD", which is the currency code of the input.

 

$(CurrencyCode(Component_Cost)

If Component_Cost is the name of a field that contains a currency value, this example returns the currency code of that field. If the Component_Cost field contains "24 USD", this example returns USD.