Support Article
Decimal property truncating amount properties after decimal
Summary
When using Decimal Properties to map or store data, a read-only attribute of currency can be specified with two decimal places.
However, when editing the field, the number is shown exactly as the user entered it.
So, for example, if the number 64 is entered, it displays as $64.00 when not being edited, but as soon as the user clicks in the field, it reverts to the actual value previously entered, 64.
Error Messages
Not Applicable.
Steps to Reproduce
Set the presentation of the cell as follows:


The property itself is defined as Decimal with a Currency UI Control:

Root Cause
This is the intended behavior.
Resolution
Perform the following local-change:
For the property itself, on the Advanced Tab, add a property qualifier of pyDecimalPrecision of value 2
This will ensure that the property value on the clipboard also has 2 digits of precision, even if the user enters fewer (or more).
It is then necessary to ensure that the field is refreshed from the clipboard after the user edits it.
For example, when the field is in a repeating grid, the following element is added to the UI action list to refresh the active row when the value changes:
Published April 29, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.