Help with Javascript with if else if statement
I've found a few posts that seem like they should work for me but I keep getting a SyntaxError: missing ; before statement 1: at line 2
My form has 9 sections. Each section has 6 - 16 sub-sections with dropdown fields. The options to select are: Met, Not Met, and Exceeded. I have given them values of 1, 3, and 6, respectively.
The sum of each section is being captured in field: Objective 1 Score. (I am using the Calculate > Value is the Sum of the following fields option). This field will be hidden as I'm only using it to capture the Score. This field is calculating properly.
I want the Score visible to the user to read as either Met, Not Met, or Exceeded, depending on the value calculated above.
- ≤ 6 = "Not Met"
- 7-18 = "Met"
- >19 = "Exceeded"
Here's my script under Calculate > Custom calculation script
var Score 1 = "Objective 1 Score";
if ( event.value < 6){
Score 1 = "Not Met";
} else if (( event.value >= 7) && ( event.value < 18)){
Score 1 = "Met";
} else if (event.value >=19){
Score 1 = "Exceeded";
}
Like I said, I get the syntax error. I haven't been able to actually test this yet.

