Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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);
Copy link to clipboard
Copied
Share your file.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Works fine for me:
Copy link to clipboard
Copied
If you put a payment in the This Payment box of the balance due, it will error out. I believe it is because of all the decimals added.
Copy link to clipboard
Copied
I'm still not getting any errors.
What software version do you use?
Did you test the file in both DC and Reader?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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);
Copy link to clipboard
Copied
Genius, Nesa!! I don't know why the real value shows all the decimals, but your custom calculation script works! Thank you so much!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more