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

Value entered does not match the format in the field

gina
Registered: May 2 2007
Posts: 2

I have the same question of the value entered does not match the format of the field. I know it is the division of 0. I downloaded the PDF but am still not finding the answer. What could the code be and where do you place it?
Thanks!

My Product Information:
Acrobat Pro 7.0.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
A division by zero will return the text string "infinity". If this is used in another calculation, it will yield "NaN". So, you've got to catch it as soon as possible. Use a JavaScript calculation and test for the input values. For example, if this is a LiveCycle form field calc.
   if(Hours.rawValue != 0)this.rawValue = Dolars.rawValue/Hours.rawValue;elsethis.rawValue = null;

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

mishiemichelle
Registered: Jan 6 2009
Posts: 1
I use Adobe Professional 8.0 and am running into the same problem with the "value entered does not match the format of the field". I'm trying to divide the number entered in one field to the number entered into another field. When I leave one field blank or delete it, I get this warning. How do I code this so that if the field is undefined then it is okay and the calculation will work accordingly?
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You need to change the FormCalc to JavaScript.
var Hours = this.getField("HoursFieldName).value;var Dollars = this.getField("DollarsFieldName).value; if(Hours != 0)event.value = Dolars/Hours;elseevent.value = '';

George Kaiser