Show always two decimals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2023 05:41 AM
Hi experts
How can we display fields from type decimals always with two decimals? E.g. "100.00" instead of just "100"? Is it possible to ensure the numbers are always displayed with two decimal places?
Do we need to change the field type to achieve this? One potential solution could be to use the "Currency" field type. But we wouldn't need the currency code. However, is it possible to display the currency code of the currency field as read-only and set the code just once for all currency fields on the record based on a choice field? Or even better to not display the currency code?
What do you think would be the way to go to achieve this?
Thanks
Dominik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2023 08:39 AM
Hello Dominik,
I have similar requirement to implement and currently I'm out of idea how to get it done.
Did you find any workaround for that? It's a shame that SNow doesn't have some fields attributes which could give the full control of display format...
Thanks in advance,
Maciej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2023 09:44 PM
Hi @Dominik9 ,
What you can do is you can write a script that can concatenate the decimal values with the number you want.
Please mark this as correct answer and helpful, if this helps you.
Regards,
Aditya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2023 04:40 AM
Hi Aditya
Thanks for your respond. This will not work. The decimal field type always cuts 0 after the dot when it is saved to the database.
Best regards
Dominik