I am new to Survey123 and Esri, and I encountered an issue when creating a survey using Survey123 Connect.
When I submit the survey, I receive a syntax error: “SyntaxError: Expected token ‘;’ in expression.” Despite this error, I can still submit the survey. However, when I try to edit the same survey, the same error appears, preventing me from sending the survey.
I have reviewed all my expressions in the XML file but cannot find where the ‘;’ should be placed. Any assistance would be greatly appreciated.
Thank you!
Solved! Go to Solution.
Thank you for all your input. I fixed the error, and it was not related to spacing. While debugging the Survey123 Connect XML to go through the steps of collecting data, the system showed the field name with the syntax error. The error originated from the instance name in the form settings page. I resolved it by removing the instance name.
I believe it's the appearance column. If I recall, you can just give multiple appearance options separated by a space. Remove the ";" characters from that column and see what happens.
The original expression didn’t include a ‘;’. After encountering the syntax error, I added a ‘;’, but it didn’t resolve the issue. The error persists with or without the ‘;’.
Hey @mobius_devil
I was curious if this could be caused to spacing or similar, in your "${incidentnames} != 'Other'" section, there are spaces, but everything else does not. Also geopoint seems to have been spelled hiden-out, I'm not sure if this is intentional, but this may change it. My final attempt may be to remove the spaces between your multiple fields in the appearances column. Not sure if that's a set one but maybe!
Cody
Thank you for all your input. I fixed the error, and it was not related to spacing. While debugging the Survey123 Connect XML to go through the steps of collecting data, the system showed the field name with the syntax error. The error originated from the instance name in the form settings page. I resolved it by removing the instance name.