Some browsers use a comma (,) instead of a period (.) as decimal separator. For example, having a decimal field in the incident table, if the user types 1.5 and moves the cursor to another field, the value will be modified to 15. But if the user enters 1,5 then the value is not modified, and the comma will take as decimal separator.  

The behavior is not the same in other browsers and the user wants to use a period as decimal separator in ALL browsers.


The browser Language dictates the decimal separator to use. 


Go to the Browser setting and review the Languages installed. Please notice that some Languages, such as Spanish from Spain uses a comma as decimal separator.

The following code can be executed from the "Scripts - Background", it will display the decimal separator used by the browser:

var locale = GlideLocale.get();
var decimalSeparator = locale.getDecimalSeparator();
gs.info( "The decimal separator is " + decimalSeparator);

For more information about GlideLocale, review: 

GlideLocale - Scoped

Article Information

Last Updated:2020-06-29 19:01:31