Values in a calculated field are rounding inconsistently. A calculated value of 20.0755 rounds down to 20.07 but 19.855 rounds up to 19.86. Because the calculated value is an amount of currency, this inconsistency is causing accounting discrepancies.
Do I need to adjust the patterns? (I don't understand the differences between the patterns available.)
I have tried using the Round function in FormCalc and Math.Round in Javascript with no change in results.
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
Views
Replies
Total Likes
Can you post a sample that shows the issue?
Paul
Views
Replies
Total Likes
Here's the file. The field in question is Amount_Personal_Mileage on the first page. The field displays the product of the "Miles" field and 0.55.
36.1 entered in "Miles" results in a correct "Amount_Personal_Mileage" display value of 19.86.
36.5 entered in "Miles" results in a "Amount_Personal_Mileage" display value of 20.07.
Thanks.
Views
Replies
Total Likes
The pattern that you are applying to the fields does not round - it simply truncates. For the total field you are saying that you only want two digits. If you want to round it up you can add the round function to the calculation:
In Javascript it woudl be:
In FormCalc it woudl be:
Paul
Views
Replies
Total Likes
Sorry to be dense, but I still get the same results. Do I need to set a pattern for the results field? If so, which one includes the dollar sign but doesn't truncate? ---Kat
Views
Replies
Total Likes
Here is an updated sample
Paul
Views
Replies
Total Likes
Thank you! You saved me from beating my head against the wall.---Kat
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies