Support Article
Locale setting modify decimal values
SA-73719
Summary
Decimal values are modified when a user logs in to the application using a pt_PT locale (any European locale).
Error Messages
Not Applicable
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.
Root Cause
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.
Resolution
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.
Published April 2, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.