Skip to main content
KROUP
Participant
January 21, 2019
質問

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

  • January 21, 2019
  • 返信数 1.
  • 592 ビュー

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.

このトピックへの返信は締め切られました。

返信数 1

Bernd Alheit
Community Expert
Community Expert
January 21, 2019

Do you use divisions in your calculations?

KROUP
KROUP作成者
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);