Format Numbers using cultureNumberFormat

Description

The Number format properties in the UX allows you to select cultureNumberFormat as the option. When you select the cultureNumberFormat option, the format specified by the browser configuration is used. So, for example, if a user in Spain runs the component, decimal numbers will be shown with a comma as the decimal character, but a user in the UK will see numbers with a period as the decimal character. This allows you to build applications that feel more natural to users in different countries.

When you choose a decimal character in the Number Format, the same character is required for data entry and is used when values are rendered. This ensures consistent behavior between user input and display.

Number format - decimal character

"Specify the decimal character (specify the actual character or the special symbols, 'period' or 'comma') that will be used on the client side when entering numbers. You can set this dynamically by setting this session variable: __protected__clientSideDecimalCharacter"

Number format - thousands separator

"Specify the thousands separator character (specify the actual character or the special symbols, 'period', 'comma' or 'space') that will be used on the client side when entering numbers. You can set this dynamically by setting this session variable: __protected__clientSideThousandsSeparatorCharacter"

In summary, if you set decimal character to comma, all users (from the US, UK, Spain, etc.) will see numbers formatted with a comma as the decimal separator for that component. It forces a single, consistent style for everyone. Contrary-wise, if you use cultureNumberFormat, this will ignore the global default and instead dynamically read the user's browser/device settings to determine the correct format.

Number Format setting

Example of the Number Format configuration in the UX component.

UX Component Properties pane showing the Number Format properties with options.

See Also