999 ODK Validate Error - Picky about characters

1408
3
03-31-2021 03:43 PM
TammySikma1
New Contributor II

A member of our organization is setting up her first Survey123 and it's looking great.  It saved fine, but when she went to Preview, she got a long ODK Validate Error message.  It turns out that there was an issue in the survey with two radio button questions that each contained rules.  If the responses or subsequent question titles contained specific characters, the 999: ODK Validate Error was returned.  The characters included a comma (,), exclamation mark (!) and apostrophes (').  

As soon as "I'm" or "don't" was replaced with "I am" or "do not" and sentences were changed to use periods, the survey Previewed successfully.  

These seem like characters that should be acceptable, and they are elsewhere in questions without rules.  I couldn't find any documentation about similar problems.  Is this a known problem? 

Start to an error that returned when a question with a rule directed the response, "I don't know" to a follow-up statement who's title read, "No worries, that's what we're here for!" below: 

{"error":{"name":"ArcGISRequestError","message":"999: ODK Validate Errors:\n>> XForm is invalid. See above for the errors.\norg.javarosa.xform.parse.XFormParseException: Encountered a problem with display condition for node [${no_worries_that_is_what_we_are_}] at line: ${what_is_an_official_plan_} ='I_don't_know', Couldn't understand the expression starting at this point: ..._plan_ ='I_don'͎t_know'\n\nResult: Invalid","originalMessage":"ODK Validate Errors:\n>> XForm is invalid. See above for the errors.\norg.javarosa.xform.parse.XFormParseException: Encountered a problem with display condition for node [${no_worries_that_is_what_we_are_}] at line: ${what_is_an_official_plan_} ='I_don't_know', Couldn't understand the expression starting at this point: ..._plan_ ='I_don'͎t_know'\n\nResult: Invalid","code":999,"response":{"error":{"message":"ODK Validate Errors:\n>> XForm is invalid. See above for the errors.\norg.javarosa.xform.parse.XFormParseException: Encountered a problem with display condition for node [${no_worries_that_is_what_we_are_}] at line: ${what_is_an_official_plan_} ='I_don't_know', Couldn't understand the expression starting at this point: ..._plan_ ='I_don'͎t_know'\n\nResult: Invalid","code":999,"details":[]},"success":false},"url":"

3 Replies
DougBrowning
MVP Esteemed Contributor

You did not list what data type you are using. I tried note and select one and they worked.

Are you making sure the outer quotes are diff than in the string?

'I don't know' will not work but "I don't know" does work.  Same '"Hello"' is ok but not ""Hello""

You can use ' in a label for select one and I got it to work in name even.  I also got , to work in label and name but name not a great idea.

DougBrowning_0-1617293085934.png

 

Hope that helps

0 Kudos
TammySikma1
New Contributor II

Hi Doug,

Thanks for the quick reply.  In both examples, the questions were a Single Choice radio button type using Set Rule to direct the respondent to either a Single Line Text response (1st example) or a Note that they could read (2nd example). 

We were able to change the Schema so the offending characters weren't a problem and keep the questions as desired successfully.

0 Kudos
Jennifer_Parmeley
New Contributor III

This is still an issue 2 years later. Thanks for posting this @TammySikma1 
This a long and error!

One of my survey options was "don't know" as soon I removed the apostrophe I was able to publish my survey