Using the Currency Control

Concepts and terms

Pega 7.1 extends support for the currency control to display a different currency than the locale currency. This means a user in one country can view amounts that are designated in a foreign currency, using that currency's international conventions.

The new autogenerated control can display a selected currency using its symbol, code, full name, or ISO code. (However, for readability, the decimal separator and thousands separator come from the locale.) In addition, if the currency is displayed as a 3-digit code, it can show the ISO code before or after the amount (and optionally delimited by a forward slash):

$ 1,000.00

1,000.00 $

USD 1,000.00

1,000.00 USD

1,000.00 /USD

Note: The main limitation of the previously standard pxCurrency is that it displayed the currency code, decimal separator, and so on, based upon the locale or by explicitly picking a different currency as the locale currency.

Implementation

The enhanced currency control contains options for presentation of amount fields in the harness or section, when the currency itself is stored in a separate field from the amount value.

The currency is saved as a numeric currency code (such as 840 for U.S. dollars). The numeric codes are maintained by the ISO 4217 currency code standard. Pega also subscribes to SWIFT directories that list the valid currency codes. The currency codes change very infrequently.

Each currency code is associated with a 3-letter text code (such as USD) or the currency symbol (such as $). Only the decimal separator and thousands separator come from the locale. The rest of the displayed data comes from the data lookup, where the 3-character code, currency symbol, number of decimal places, and so on, are obtained.

For example, if the value is 2000.00 EUR, a user in Germany sees the value as 2.000,00 EUR, and a user in the United States sees it as 2,000.00 EUR – the same currency but with different decimal separators, according to the convention used for each locale.

Definition Currency code
Definitions Harness and section forms - Adding a Currency Control

UpConcepts