Expression fields - decimal places in portal pages

Posted by gwf on 20-Nov-2014 15:28

Hi,

I set up various expression fields to show two decimal places. In portal pages they display properly except if the second decimal place is a zero, in which case it is truncated and the number only shows with one decimal place. Is there some way to force the fields to show two decimal places in these cases?

Thank you,

Greg

Posted by Gian Torralba on 20-Nov-2014 16:14

Hello,

This is tracked as defect PSC00321531. Unfortunately, there is no other way to force the zeros in the return value of the expression field.

Thank you,
Gian

All Replies

Posted by Gian Torralba on 20-Nov-2014 16:14

Hello,

This is tracked as defect PSC00321531. Unfortunately, there is no other way to force the zeros in the return value of the expression field.

Thank you,
Gian

Posted by gwf on 21-Nov-2014 14:28

Thank you, Gian.

Posted by pvorobie on 01-Dec-2014 12:06

Please check that number of decimal places is set to desired value (it is 0 by default).

Posted by gwf on 02-Dec-2014 13:33

Yes, it is set to the desired value of 2 decimal places, but truncates as described above. I scrapped the expression fields and moved the formulas to JavaScript code for each page with the toFixed(2) method, which displays properly.

Thanks,

Greg

Posted by Gian Torralba on 02-Dec-2014 14:15

Hello,

The workaround will definitely work using the toFixed(2) method. This will still be tracked as a defect and should be fixed in one of the upcoming version updates. Thank you for your patience.

Regards,
Gian

Posted by pvorobie on 02-Dec-2014 15:06

I see normal behavior, no truncation.

Posted by Gian Torralba on 08-Dec-2014 08:59

Hello,

Can you try updating the decimal places to 2 and then try updating the record so that the expression fields are updated? I just tested this in 3.0.5 and it is working as expected. I am using 6 decimal places in the expression field in the image below.

Thank you,

Gian

This thread is closed