missing ) after condition
Hi, I’ve been trying to teach myself basic javascript to automate some PDFs at work and I’m stuck on a formatting issue that is not obvious to me at the moment. The code in the script editor is as:
var WMS = this.getField("Water Meter Size").valueAsString;
if (WMS==="") {
event.rc=true;
} else if (WMS==="1" Line 5/8" Meter") {
event.value=75;
} else if (WMS==="1" Line and Meter") {
event.value=90;
} else if (WMS==="1.5" Line and Meter") {
event.value=125;
} else if (WMS==="2" Line and Meter") {
event.value=150;
} else {
event.value="";
}
Water Meter Size is a dropdown field with set strings.
When I try to close the window with ‘OK’ I’m getting the error ‘SyntaxError: missing ) after condition 5: at line 6’. It’s not clear to me where the closing operator is intended to be.
