Skip to main content
Participating Frequently
January 31, 2024
Answered

Why are my calculated values not formatting correctly

  • January 31, 2024
  • 4 replies
  • 3086 views

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.

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

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?


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 

4 replies

JR Boulay
Community Expert
Community Expert
February 1, 2024

Does this issue occur before or after flattening?

Acrobate du PDF, InDesigner et Photoshopographe
Participating Frequently
February 1, 2024

Before but you can only see the decimal values if you click on the field.  Flattening just shows the whole value.

Participating Frequently
February 1, 2024

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.

JR Boulay
Community Expert
Community Expert
January 31, 2024

PDF Expert is not reliable, it's a low-end software based on MacOS PDF Services.

Acrobate du PDF, InDesigner et Photoshopographe
Nesa Nurani
Community Expert
Community Expert
January 31, 2024

Where do you use file?

Participating Frequently
January 31, 2024

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.

Participating Frequently
February 2, 2024

Thanks Nesa, I was able to add the toFixed() script and got it working.  I appeciate your help.


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?