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

Can you change field max length to 24 and try?


Hi Nish


I've changed the field length to 24 (also have scale=2 in Attributes)


find_real_file.png



Change to Amount field to 150.00


find_real_file.png



After submitting, the places do not appear to stay


find_real_file.png



This behaviour remains the same if I remove the scale=2 attribute.



Thanks


George


manoj_s
Giga Contributor

Did you find a solution to this ?

I can do it on the form with the client script , But how to do it in the list view ?