- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2025 10:19 PM
I have a table thats imported from excel. I want to change the data thats already on the table to 4 decimal place. How can i do it? the field is in decimal. Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2025 11:40 PM
Hello @TashfiqueH
- I don't think we can change the already existing data in 2 decimal place to 4 decimal place.
- However we can do the field configuration for new inputs.
- To change the number of decimal place you will have to navigate to the configure Dictionary of that field.
Change the max length and attribute as shown in the screenshot:
The decimal places for a field are a combination of the max length attribute setting and the scale attribute. By default max length is 15 and it hold 2 decimal space.
For example, if you want four decimal places for the field, you need a max length attribute setting of 4, plus the default of 15 or 19. You would set the scale attribute to 4 to indicate the number of decimal places. Six decimal places require a max length setting of 21, a scale attribute setting of 6, and so on.
Note: Increase the max length attribute to a value greater than 15 to increase this attribute. It is mandatory to change the max length.
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2025 10:51 PM
Hi @TashfiqueH ,
To achieve this combination of Max length for the field and the scale attribute .Could you please refer this article
If this helped please like and mark it as an accepted solution.
Thanks,
BK
Thanks,
BK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2025 11:40 PM
Hello @TashfiqueH
- I don't think we can change the already existing data in 2 decimal place to 4 decimal place.
- However we can do the field configuration for new inputs.
- To change the number of decimal place you will have to navigate to the configure Dictionary of that field.
Change the max length and attribute as shown in the screenshot:
The decimal places for a field are a combination of the max length attribute setting and the scale attribute. By default max length is 15 and it hold 2 decimal space.
For example, if you want four decimal places for the field, you need a max length attribute setting of 4, plus the default of 15 or 19. You would set the scale attribute to 4 to indicate the number of decimal places. Six decimal places require a max length setting of 21, a scale attribute setting of 6, and so on.
Note: Increase the max length attribute to a value greater than 15 to increase this attribute. It is mandatory to change the max length.
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2025 11:51 PM
ensure you update the field map or use onBefore transform script to convert that field to 4 decimal places.
Run the transform again and it will override the value for that column keeping other data intact.
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
‎01-15-2025 12:10 AM
Hi @TashfiqueH ,
you can glide record on your table to get the list of record and update it like below
parseFloat(current.amount).toFixed(4);
you can use background or fix script to update the value.