Spaces in Multi-select choice names: Is there a workaround in Survey123 Connect?

677
2
11-23-2021 04:13 PM
AnthonyCastelletto
New Contributor II

Hi everyone,

   I'm new to Survey123 Connect and it solves a bunch of problems for me with long multi-choice menus. The issue I'm having is the fact that spaces are not allowed in the name field of the choices XSLForm. I've substitute underscores for the spaces, but it looks funny when I display survey results. Are there any work arounds for this issue? Can the data be processed after submitting? Is there some kind of postprocessing trigger like you might see in some relational databases? 

Thanks.

0 Kudos
2 Replies
ZacharySutherby
Esri Regular Contributor

Hello @AnthonyCastelletto

Can you please elaborate more on where you are displaying your survey results? In most clients the choice label will display instead of the name, in the label you can use spaces for your choices which will make the choices appear as expected. 

Thank you,
Zach
0 Kudos
AnthonyCastelletto
New Contributor II
Sure thing. I've included a screenshot. Like they say in creative writing, don't tell, show. I'm putting together a form that records the location of various ocean observing projects. So, I've got a big long list of seas, gulfs, bays, and other aquatic settings. They have names like "Bering Sea" or "Southeast US Continental Shelf". So I'm making some pulldown menus for users to select the location of the project they're entering. In the XSL form's survey sheet, I specify the field as "select_multiple select_LME" for the Large Marine Ecosystem field in my survey. I then specify the value list in the choices sheet as "select_LME" in the list_name column, "Southeast US Continental Shelf" in the name column, and "Southeast US Continental Shelf" in the label column. When I try to publish, I get an error saying that spaces are not allowed in the name column.

My first solution was to replace spaces with underscores "_" just while I was learning how to use Survey123 connect. That worked fine and I got nice looking survey form. Save for the fact that the underscores show up in the results when I look at the data. Were I using Survey123 to run an actual survey, this would be no problem. That would just be how I coded the response. I would count up the responses and do me statistics on them. However, I'm using Survey123 as an input form for a feature layer that I want to query later on. When I do those queries, the results come back with the underscores and, like I said, that looks strange. I'd like my results to come back "Southeast US Continental Shelf" instead of "Southeast_US_Continental_Shelf". That's thing I'm trying to work around. Would it be as simple as substituting the the HTML non-breaking space entity, " "? Since this all comes to my users across the web, it doesn't matter if there's an HTML entity there or not so long as they see white space where there should be white space.

Thanks for your help and advice.

Anthony Castelletto
Research Associate
Center for the Blue Economy
Middlebury Institute for International Studies

0 Kudos