These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Calculation Format Error

combsg
Registered: Apr 25 2007
Posts: 4

I am creating a very simple equation. I have four text fields labeled A,B,C, and D.
 
I then have in another text field with this equation
((A/B)*C)/D
 
Every time I enter one of the values I get this message that says "The value entered does not match the format of the field [E]"
If I keep pushing "ok" enough times it will eventually do the formula fine.
 
Is there anyway to get this message not to pop up or somehow tell it to make the calculation once it has all of the fields?
 
Thanks,
 
Gary

My Product Information:
Acrobat Pro 6.0.1, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
There are two divisions in this calculation. If "B" or "D" field is empty, then it is most likely being interpreted as Zero. In JavaScript division by zero returns the word "infinity", which cannot be used in further calculations. Unless you can guarantee that "B" and "D" are always a valid number you'll have to do some testing on the calculation inputs and then display a value that can be shown in your output field, which I imagine is formatted for a number.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script