Is there a way to allow commas in external choices?

158
4
11-19-2018 12:50 PM
Highlighted
New Contributor II

I have a survey that is being developed that needs to use external choices to prompt follow on questions to the correct selection choice based on the previous answers. e.g. if they select yes, they have a few choices via select_one_external prompt, and then based on this answer, they are presented with appropriate select_one_external choices.  This all seems to working as expected until I have an answer with a comma in the text.  Doing some more research into this, it appears to create a csv file in the Media folder and calls this itemsets.csv.  So I believe, because this is being turned into csv, the comma is messing the order up.  Is there a way to keep the comma and enclose the text in quotes like you can with other csv files?  


Thanks

Tags (1)
Reply
0 Kudos
4 Replies
Highlighted
Esri Esteemed Contributor

Hi Jeff,

You are correct, commas in external choices is not supported at this time.

Reply
0 Kudos
Highlighted
New Contributor II

Thanks for confirming this.  Is there an alternative way or plans to implement this?  Our survey is pretty complex now and we are using the external choices to help populate common responses to certain questions to expedite entry.

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

At this point in time, there is not a way to encode a comma in the text of an external select.

Reply
0 Kudos
Highlighted
Esri Contributor

Hello James,

I wonder if there's any other restriction on the use of special characters in the external_choices label column, in particular 'Semi-colon' ( ; ), 'Asterisk' ( * ) and 'Hyphen-minus' ( - ) (this is what Excel created when type in hyphen or minus).

I think these special characters are not allowed in the [column names] and [name] values in the choice lists, but they are allowed in the [label] values in the choice lists. Are they also allowed in the [label] values when being used in the external_choices and saved out as the 'itemsets.csv'? I know csv doesn't like some special characters.

Furthermore, are they allowed in the external csv tables for pulldata()? I have been using 'Hyphen-minus' ( - ) as negative sign in the external csv tables and it works fine so far. My reference is the XLSForm.org, it mentions the use of special characters in csv for pulldata():

In addition, the 'Hyphen' in the Special Characters list in Survey123 Connect template is actually 'Hyphen-minus' ( - ), not the actual 'Hyphen' ( ‐ ). All Special Characters lists in the Survey123 support document pages are also using 'Hyphen-minus'. 

   

Any help would be appreciated. Thank you. Zhifang Wang Ismael Chivite

Kind Regards,

Jing Sun

Reply
0 Kudos