Skip to main content
tactical error
Known Participant
January 6, 2020
Question

Need Help creating calculations

  • January 6, 2020
  • 1 reply
  • 652 views

I know this is probably easy, and I'm just not seeing it, but here goes-  I need to add two fields together and divide that answer by a third field, AND get a percentage that isn't multiplied by 100.   Beginning to think I'm looking for a unicorn, so I'm counting on your help!  Thanks in advance!

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
January 6, 2020

This is very simple. Here's an article that explains calculations.

https://acrobatusers.com/tutorials/print/how-to-do-not-so-simple-form-calculations/

 

Do not use the % formatting option.

 

You can find out much more here:

https://www.pdfscripting.com/public/Calculating-field-values-and-more.cfm

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
tactical error
Known Participant
January 6, 2020

Thanks Thom!  Unfortunately, the sum needs to be a Percentage.  It's a form used for mortgage underwriting and we need to have the Loan to Value and the CLTV expressed as a Percentage.   And to add insult to injury, I followed the instructions, and now whenever I fill any field that's not tied to the Percentage, I get this error message- "The value entered does not match the fromat of the field [LTV]"     It's a bit maddening...We're hopeful to be able to have the form completely fillable, rather than print, complete and scan to a file.  

 
 
 
Thom Parker
Community Expert
Community Expert
January 6, 2020

The first problem you need to solve is getting your calculation working properly. Then you can worry about the format. 

So, remove all formatting from the field. It is the formatting script that is reporting the error.

Now, is your calculation working?

Which method did you use, Simplified Field notation or scripting?

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often