Copy link to clipboard
Copied
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 = "";
}
Use * for the multiplication.
Copy link to clipboard
Copied
Use * for the multiplication.
Copy link to clipboard
Copied
Perfect, that did it.
Thank you!!