Skip to main content
Participating Frequently
November 22, 2019
Answered

The value entered does not match the format of the field Syntax Error missing before statement

  • November 22, 2019
  • 1 reply
  • 807 views

Hello,

I'm trying to put in a custom calculation script to solve the error "the value entered does not match the format of the field."  I've followed instructions on prior posts for those who've gotten this error and but am now getting an error in the script "SyntaxError: missing ; before statement 4: at line 5 and i can't figure out what needs to be done to get past this error.  Can someone please help me get past this? Here is my script:

 

 

var numerator = (+getField("UnitPriceRow1").value) - (+getField("CostRow1").value);
var denominator = +getField("UnitPriceRow1").value;
if (denominator !== 0) {
event.value = (numerator / denominator) x 100;
} else {
event.value = "";
}

This topic has been closed for replies.
Correct answer Bernd Alheit

Use * for the multiplication.

1 reply

Bernd Alheit
Community Expert
Bernd AlheitCommunity ExpertCorrect answer
Community Expert
November 22, 2019

Use * for the multiplication.

Participating Frequently
November 22, 2019

Perfect, that did it.

 

Thank you!!