Locale setting modify decimal values
Decimal values are modified when a user logs in to the application using a pt_PT locale (any European locale).
Steps to Reproduce
- Add the operator locale as pt_PT.
- Fetch decimal values from an external system through the data page in the Autopopulate control.
- On selecting a particular value from Autopopulate, set the value to a different property. The decimal value changes.
In the European locale, decimal properties have comma as the decimal separator and dot as the comma separator.
Decimal or double property currency conversion occurs according to the operator locale at the server side. Property value sent in the request must be as per the locale format.
In this use case, the decimal property value is set from the Autocomplete set value, which is the value present in the Clipboard (which is in en_US locale).
The GMT value sent in the request and currency conversion that occurs at the server side, considers the property value in the request as the locale specific value. Hence, the value is incorrect in the response.
When selecting a value from Autocomplete, the system should format the property value according to the locale. However, this is a limitation from the Autocomplete control. That is, additional field values are set directly from the Clipboard and the property type locale is not checked. Hence, the Clipboard value is set to a decimal property (which is en_US format) and at server side currency conversion occurs according to the operator locale.
An enhancement request, FDBK-30273, is created for consideration by Pega Product Management.
Perform the following local-change:
Locale formatting does not occur for text properties.
- For autocomplete additional property, set the value to a text property.
- OnChange, configure a refresh section with a data transform which sets the value to a decimal property from text property.
0% found this useful