Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Strange Behaviour

Avatar

Level 2

Hello,

I have an expense form which is acting very strange. It consists of several user entered fields in one table row all formated as currency. In one of the fields however a calculation is taking place using Formcalc and the script is:

if(DeptCode == 722)

then
$=kms*.444
else
$=kms*.555
endif

This field is also formated to return currency. The stange part is the total which is summing up all the fields, does not round up correctly. For example, if I put in 679km which is then multiplied by .555, the total of this is $376.845, if I then put another amount in another field of i.e. $20.01, the total will return $396.85 instead of $396.86. Even stranger is if I put  amounts of .01 in all of the different fields, it either does not include the .01 and skips it or will add it as .02.

I did try putting Ceiling in to round up but it rounded up to the highest dollar with no cents as did Round.  Does anyone know how to get it to round correctly?

Thanks!

1 Reply

Avatar

Not applicable

Hi,

Set the display pattern as $z,zz9.99 to $ field in design which will resolve your problem.

Thanks

Shan