Support with Form logic error

hello colleagues, I have been building a form where i wanted to add some scores to some positive and negative responses. I got a challenge with the questions which has only one type of score ( positive responses) and it gave me this error below and i dont know if anyone has it encountered them.

FormLogicError: Could not evaluate: if(( /model/instance[1]/aJVVYSMVbntpM3wDeZAmuY/questionnaire/_9_What_do_you_like_about_the_o _=‘a__playing_together’),1,if(( /model/instance[1]/aJVVYSMVbntpM3wDeZAmuY/questionnaire/_9_What_do_you_like_about_the_o =‘b__discuss’),1,if(( /model/instance[1]/aJVVYSMVbntpM3wDeZAmuY/questionnaire/_9_What_do_you_like_about_the_o =‘c__going_to_school_together’),1,if(( /model/instance[1]/aJVVYSMVbntpM3wDeZAmuY/questionnaire/_9_What_do_you_like_about_the_o =‘b__discuss’),1,if(( /model/instance[1]/aJVVYSMVbntpM3wDeZAmuY/questionnaire/_9_What_do_you_like_about_the_o =‘d__we_are_friends_share_the_meal’),1))))), message: not sure how to handle expression called on nodeset that doesn’t start with a ‘/’: {“stack”:[{“t”:“root”,“tokens”:[]},{“v”:“if”,“t”:“fn”,“dead”:false,“tokens”:[]},{“v”:“”,“t”:“fn”,“dead”:false,“tokens”:[{“t”:“arr”,“v”:[{}]}]}],“cur”:{“v”:""}}

Hi @geofrey_arum, I see you are using the if sentence incorrectly. Quesetion needs to be between two {} parenthesis, and there should be a $ sign. for example if(${/model/instance[1]/aJVVYSMVbntpM3wDeZAmuY/questionnaire/_9_What_do_you_like_about_the_o _} = ‘a__playing_together’),1, if(${/model/instance[1]/aJVVYSMVbntpM3wDeZAmuY/questionnaire/_9_What_do_you_like_about_the_o} = “‘b__discuss”),1,0))

1 Like

Hi @osmanburcu , thank you. let me double check and will let you know if it fixes the error.

I am still getting the error but this is the and i dont know where the problem is?
: if((${_9_What_do_you_like_about_the_o}=‘a__playing_together’),1,if((${_9_What_do_you_like_about_the_o}=‘b__discuss’),1,if((${_9_What_do_you_like_about_the_o}=‘c__going_to_school_together’),1,if((${_9_What_do_you_like_about_the_o}=‘b__discuss’),1,if((${_9_What_do_you_like_about_the_o}=‘d__we_are_friends_share_the_meal’),1)))))

Hi, why do you use double parantesis in the if sentances? It should be If(${},1,0)

1 Like

@osmanburcu, :clap: :heart: :partying_face: