AnsweredAssumed Answered

If statements and Syntax Error: Expected token ';'

Question asked by on Sep 26, 2018
Latest reply on Sep 27, 2018 by

I am trying to do an if statement in a calculate field in Survey123 Connect but I keep getting the error  "Syntax Error: Expected token ';'


Does anyone have any ideas what I am doing wrong?




My survey has the following parameters:


QA field type: text

QB field type: text

Q1 field type: select yes_no

Q2 field type: text


Q2 calculation column entry: if(${Q1} = 'yes', ${QA}, ${QB})


I want the answer to Q2 to equal QA if Q1 = yes, and to equal QB if Q1 = no.


Anyone else have experience with this syntax error? I also get the syntax error if I try and replace ${QA} and ${QB} in the calculation field with integers.






James Tedrick