Decimal fields truncate trailing zeroes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2012 11:29 AM
I have created a form with several decimal fields that I want to be formatted as #.##
However, upon save to the database table, the traling zeroes are removed. For example, 1.00 gets set to 1. And 2.50 gets set to 2.5. I would like for all of my numbers to have a certain precision so they line up when displayed in a list. I reviewed the forum and tried the scale=2 suggestion, but that doesn't work. I created a client script that take the field and formats it as #.## using JavaScript. However, as soon as the record is saved, the trailing zeroes/formatting are removed.
Any idea on how to do this or if it's possible?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2015 08:43 PM
Hi, there.
Had the same challenge showing decimal 'zeros', e.g. show '50.00' in stead of '50'. I used the 'Price' field type which is a decimal field with an additional drop-down for currencies... In my case the decimal field is actually a 'monetary' value and therefore works for me. Could probably also use the currency field. Not sure how to solve this for a generic 'decimal' field.