How do I limit decimal points in a currency field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2020 04:05 AM
Hi all,
I'm currently building a form, and on it I have several fields which hold a monetary value. I have selected Currency as the field type. However, I have been tasked with limiting the decimal points (to 2) to avoid the potential of erroneous values being entered. Currently, the max length is 15 and I am free to enter any value I want.
I tried changing the default value to 7 which may help, but it will always default back to 15. I tried adding scale=4 to the attributes section, but this didn't make any difference to the field. I even tried the scale=4 on the decimal field type and this didn't seem do anything either. I followed this old guide but it might be out of date by now? I also tried following this New York guide, but I couldn't find glide.currency_price.use_all_fraction_digits in the list.
Does anyone have any ideas or different approaches to this?
Thank you,
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2020 04:49 AM
Hello Jon,
Create the property and set the value accordingly, if the property is not available in your system.
Regards,
JAS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2024 12:12 AM
Hi Jas,
I have tried and set the value to False so that it can display only 2 decimals but it is not working. At the end it is restricted to 4 decimal points only. What might be the problem can anybody help me please.
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2020 08:27 AM
Thank you JAS.
I will try this and see if it works 🙂