Copy link to clipboard
Copied
Can anyone tell me why my values are coming out as standard decimal notation?
There is nothing special going on here just Footage*price = total. Some of my values come out correctly $ amount with 2 decimals and others are like this example 128.3500000000002. Does anyone know how to correct the formating? Also this is only happening with certain calculations.
5 x $25.67 = 128.35000000000002
6 x $25.67 = 154.02
Attached is also the file I am working on.
Copy link to clipboard
Copied
On mobile devices it is not guaranty to work even in PDF expert.
For me on Acrobat pro works fine, you can use custom calculation script instead and set number of decimals with toFixed() method.
You can also remove all simplified field notations and use loop to calculate all fields with one script (although your field "Total FenceAMTRow25" has an error in naming, there shouldn't be space if you are going to use loop).
Copy link to clipboard
Copied
You need to fix field calculation order, your TOTALS OF JOBS should calculate last, and it's on the top of the list (should be on the bottom).
If you are still using old adobe interface, select 'Prepare form' tool then click on 'More' and 'Set field calculation order', make sure fields that calculate first are on top.
EDIT:
I would remove all of those calculations and use loop in one field to calculate all like this:
https://drive.google.com/file/d/1hvey9Z8GWJfB9MVn_BH1bbny2uIjx6jk/view?usp=sharing
Copy link to clipboard
Copied
Where do you use file?
Copy link to clipboard
Copied
Our sales reps use it in PDF Expert and flatten the file. Flattened it shows all the decimals. We need it not to.
My example is in Adobe Acrobat Pro.
Copy link to clipboard
Copied
On mobile devices it is not guaranty to work even in PDF expert.
For me on Acrobat pro works fine, you can use custom calculation script instead and set number of decimals with toFixed() method.
You can also remove all simplified field notations and use loop to calculate all fields with one script (although your field "Total FenceAMTRow25" has an error in naming, there shouldn't be space if you are going to use loop).
Copy link to clipboard
Copied
Thanks Nesa, I was able to add the toFixed() script and got it working. I appeciate your help.
Copy link to clipboard
Copied
File attached has the script active but the Totals of Job does not seem to be calculating correctly. Could you take a quick look and see if you notice what the issue is?
Copy link to clipboard
Copied
You need to fix field calculation order, your TOTALS OF JOBS should calculate last, and it's on the top of the list (should be on the bottom).
If you are still using old adobe interface, select 'Prepare form' tool then click on 'More' and 'Set field calculation order', make sure fields that calculate first are on top.
EDIT:
I would remove all of those calculations and use loop in one field to calculate all like this:
https://drive.google.com/file/d/1hvey9Z8GWJfB9MVn_BH1bbny2uIjx6jk/view?usp=sharing
Copy link to clipboard
Copied
Thank you soooo much. I think I'm all good now.
Copy link to clipboard
Copied
PDF Expert is not reliable, it's a low-end software based on MacOS PDF Services.
Acrobate du PDF, InDesigner et Photoshoptographe
Copy link to clipboard
Copied
Also does anyone know why this would have started happening just now? We've used these forms for years and just this past week started to see this issue.
Copy link to clipboard
Copied
Does this issue occur before or after flattening?
Acrobate du PDF, InDesigner et Photoshoptographe
Copy link to clipboard
Copied
Before but you can only see the decimal values if you click on the field. Flattening just shows the whole value.

