Is there a way to allow commas in external choices?

913
5
11-19-2018 12:50 PM
JeffVan_Etten2
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)
0 Kudos
5 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Jeff,

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

0 Kudos
JeffVan_Etten2
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.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

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

0 Kudos
Jing_Sun
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

0 Kudos
DougBrowning
MVP Esteemed Contributor

But in regular Choice list Labels commas are ok now?  Seems to work

Special characters
These characters can't be used in the name of a question. Some of these may also prompt warnings when used in choice lists but can be generated and used successfully, with the exception of spaces in a choice list used by a select_multiple question, which will fail.

thanks

0 Kudos