Skip to main content
New Participant
May 9, 2023
Answered

Large numbers add multiple decimal places

  • May 9, 2023
  • 2 replies
  • 4527 views

This is kicking my tail!  We have a form which calculates payments made, due and total.  I have all fields set to two decimal places.  Adding a large number such as 696065.99 to the Contract Price fills in the proper number in the Balance Due column.  However, adding a number larger than 434000 changes the Balance Due to about 11 decimal places (any smaller number does not).  I'm attaching what I see in the colums as the actual numbers and the errors it brings.

I do not get errors with large numbers and decimals in any of the other fillable colums.  I've tried eliminating the text box and re-doing it, but get the same issue.  Please help!

This topic has been closed for replies.
Correct answer Nesa Nurani

On your first line, if you enter the balance due to the this payment box, you do not receive an error and it resolves to $ 0.00?

I'm using Pro, but there are customers who are using Reader.


No, I don't get any error.

Balance field is formatted to two decimals, and it shows correct for me, but if you click in a field it will show real value of "96064.55000000005".

If you wish to round real value to two decimals, then use a custom calculation script like this:

var a = Number(this.getField("BaseContractAmount").valueAsString);
var b = Number(this.getField("AmountfromPreviousRequest").valueAsString);
var c = Number(this.getField("AmountoftheCurrentPayment").valueAsString);
var total = a-b-c;
event.value = total.toFixed(2);

2 replies

New Participant
May 9, 2023

Apologies.  Here is the file.

Nesa Nurani
Inspiring
May 9, 2023

Works fine for me:

Nesa Nurani
Nesa NuraniCorrect answer
Inspiring
May 9, 2023

On your first line, if you enter the balance due to the this payment box, you do not receive an error and it resolves to $ 0.00?

I'm using Pro, but there are customers who are using Reader.


No, I don't get any error.

Balance field is formatted to two decimals, and it shows correct for me, but if you click in a field it will show real value of "96064.55000000005".

If you wish to round real value to two decimals, then use a custom calculation script like this:

var a = Number(this.getField("BaseContractAmount").valueAsString);
var b = Number(this.getField("AmountfromPreviousRequest").valueAsString);
var c = Number(this.getField("AmountoftheCurrentPayment").valueAsString);
var total = a-b-c;
event.value = total.toFixed(2);
Inspiring
May 9, 2023

Share your file.