Hi,
I am quite the novice when it comes to survey123. I am trying to generate a form that will out put a calculated value from our survey questions. I am using the if(${NAME}='NAME'='0', formula.
I am trying to get the form to generate a score from the values selected in the survey. Here is what I have so far. If someone could help me with the equation that will calculate the values in the score column that would be awesome!
The error message I have is b'ODK Validate Errors:\n>>XForm is invalid. See above for the errors.\norg.javarosa.xform.parse.XFormParseException: Invalid calculate for the bind attached to"${score}" : Couldn\'t understand the expression starting at this point ...test/wetplants\xcd\x8e\'))))))))))))))
Thanks!
I have attached the form I have right now.
Solved! Go to Solution.
To add more to @DougBrowning 's answer, here is a simple XLSForm that hopefully gives you some ideas.
Note that:
Check the attached XLSFile for details
You are missing the final else on all your if statements.
Like if({channel}='something','3', ELSE) need at least something there. Also not sure why you are making them all string vs number depends on your use.
See https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm
Hope that helps.
To add more to @DougBrowning 's answer, here is a simple XLSForm that hopefully gives you some ideas.
Note that:
Check the attached XLSFile for details
Thank you! This was very helpful!