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

For a description of the business object categories, see Notes on "Enabled For".

Business object category Yes/No
Business Rules: Before-Save Rules Yes
Business Rules: Calculation Rules (After Save, with or without Also Recalculate on Load) Yes
Business Rules: Calculation Rules (Before Save or Always, without Also Recalculate On Load) Yes
Business Rules: Calculation Rules (Before Save or Always, with Recalculate On Load) Yes
Business Rules: Editing Rules Yes
Business Rules: Initialization Rules Yes
Business Rules: Read Only Rules Yes
Business Rules: Required Rules Yes
Business Rules: Validation Rules Yes
Client Expressions Yes
Object Permissions No
Services Yes
LDAP Yes
Mobile Yes
Quick Actions (except UI Quick Actions) Yes
UI Quick Actions Yes
Reports Yes
Search/Dashboard without field references Yes
Search/Dashboard with field references No

Parameter

Parameter Description
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.