Posted: 2 Dec 2020 5:58 EST Last activity: 2 Dec 2020 17:08 EST
Customize decimal separator in currency control.
We do have a requirement where we need to have the control on decimal separator in currency control based on certain parameter (not on the locale settings).
Currently what pega provides is the currency control based on the locale setting. The challenge with this is if we the change the locale at the profile level all other components will also get localized.
This sounds an odd "requirement". It would surely be a confusing user experience for users to see/enter currency in a different format than their local, and particularly to an extent of a format that does not match any locale. That is, I usually use decimal point, but for one field in my app I need to know to enter a comma? That sounds crazy.
Challenge the client on their "requirement" which delivers a non-standard user experience. Another way of framing the requirement may be that the currency field is displayed according to a different locale ... i.e. "always show/capture this Currency field according to the French locale"
For implementation options, do a rule search in Dev Studio for FormatNumber, which turns up:
A Control that wraps the PRNumberFormat.format(...) function
A series of Functions named pxFormatNumber
I don't think any of these fit your need, but they may provide inspiration for the customization you likely need to do. Note that with customization, comes upgrade risk.
Most "Format Number" APIs appear to be locale-driven, so if there is a locale that fulfils the client's "requirement" then that would be preferable than string manipulation (for display) and input validation (for capture) which is a lot of work for a bespoke "requirement".