how to retains decimal field 2 places after record submits

georgechen
Kilo Guru

I am stuck at a decimal field cosmetic where the 2 places need to present always, for example, if users enter 123.00, the .00 need to stay when the record is submitted.

In ServiceNow, this is not a difficult thing to do if the field is set to Currency or Price, however, due to the limitation of list editing.   The users are not able to edit in List view; therefore I had to work this around by changing it to a decimal field which allows users to edit, which is great!!

However, the Decimal field does not retain the 2 places after submitting when a whole number is entered, e.g 123.00

find_real_file.png

After submitting the record, the 2 places are gone

find_real_file.png

Is any way to always retain the 2 places all the time.

Thanks.

17 REPLIES 17

PriyaRanji
Tera Guru

Hi George,



Good Day



Can you please check the below one which you have mentioned in the catalog item. Hope it will helps you out!


find_real_file.png



Let me know in case of any concerns.



Thanks,


Priyanka R


Hey Priyanka


Sorry I must have forgotten what i mentioned or lost the URL.     Would you mind giving the url?


Thanks


Hi George,



I have seen the screenshot shown in this query, can you tell me which url you are looking for?



Thanks,


Priyanka R


shloke04
Kilo Patron

Hi George,



Below mentioned links may be useful for your query:



How to round decimal field value to two decimals in business rule


https://www.servicenowguru.com/system-definition/controlling-decimal-field-places/



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke