Where is configuration set of price type currency format
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
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?
can anyone suggest me where will be the configuration of format in system?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
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
Regards,
Nikhil Bajaj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Take for example, below record in Asset table,
You can see the field is of type Currency and it uses com.glide.currency for currency related operations,
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