Skip to main content
KROUP
Participant
January 21, 2019
Question

How to you troubleshoot the error "the value entered does not match the format of the field"?

  • January 21, 2019
  • 1 reply
  • 591 views

How to you troubleshoot the error "the value entered does not match the format of the field"?  The message is being generated more than 50 times in the file.  You have to click OK on each of the messages before you can do anything else in the file.  When you edit the javascript you get the same error message but may reference another field.

This topic has been closed for replies.

1 reply

Bernd Alheit
Community Expert
Community Expert
January 21, 2019

Do you use divisions in your calculations?

KROUP
KROUPAuthor
Participant
January 21, 2019

No, just sums.  See example below.  Field1 is a text field with a value of "." or "yes".  Fields 2, 3, and 4 are total fields of numbers.  The *1 is being used to get the formatting needed of the number without decimal places. 

var a=this.getField("field1");

var b=this.getField("field2");

var c=this.getField("field3");

var d=this.getField("field4");

if (a.value=="yes"){event.value=''}

else

event.value=b.value+c.value+d.value*1;

if (event.value==0||event.value=='') {event.value=''};

try67
Community Expert
Community Expert
January 21, 2019

Change this line:

event.value=b.value+c.value+d.value*1;

To:

event.value=Number(b.value)+Number(c.value)+Number(d.value);