Where is configuration set of price type currency format

rmaroti
Tera Contributor

Hi Everyone,

 

I want to understand the configuration behind the value formatting of a field with the "Price" type.

For example, the "Cost" field, which is of type "Price", has a value like 987654321, and it is displayed as 987,654,321 with commas inserted after every three digits.

Could you please let me know where the logic or configuration resides that formats the number with commas as thousand separators, as shown in the screenshot?

rmaroti_0-1754993343462.png

can anyone suggest me where will be the configuration of format in system?



8 REPLIES 8

Deepak Negi
Mega Sage
Mega Sage

Not sure about this config though but if you dont wanna show any commas, you can add format=none in the dictionary attribute. It works fine for an integer field

 

 

Nikhil Bajaj9
Giga Sage

Hi @rmaroti ,

The user's locale dictates how currency values are formatted for display, including the decimal separator and thousands separator.

 

The system determines the user's locale based on the following order of precedence:

    • Test locale (set using glide.system.locale.test).
    • User record: The language and country specified in the user's record.
    • System locale: Configured through the glide.system.locale property, formatted as Language.Country.
    • Browser locale.

 

Hope it will be helpful. If yes, please mark my answer as Solution accepted.

 

Regards,

Nikhil Bajaj

 

Please appreciate my efforts, help and support extended to you by clicking on – “Accept as Solution”; button under my answer. It will motivate me to help others as well.
Regards,
Nikhil Bajaj

Ankur Bawiskar
Tera Patron
Tera Patron

@rmaroti 

I think it comes from user's locale and currency format and impacts every price field and not specific one.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Bhuvan
Tera Sage

@rmaroti 

 

Take for example, below record in Asset table,

 

Bhuvan_1-1754994650376.png

 

You can see the field is of type Currency and it uses com.glide.currency for currency related operations,

Bhuvan_2-1754994963873.png

 

Refer below articles for more details,

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0623300

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0596448

 

Thanks,

Bhuvan