Survey 123 Multiple Choice Field Results for Narrative Use

1701
2
04-23-2019 07:34 AM
Status: Open
Alex-Santos
Occasional Contributor
I am suggesting a better approach to how survey results deals with multiple choice questions in feature layers hosted in ArcGIS Online. The display issue with Survey123 is how it handles multiple-choice questions. Survey123 uses XLSforms and creates set coded valuesEach answer choice is appended as comma separated values within the attribution. It does not allow special characters and therefore uses underscores (rather than 'space'). This is by design for Survey123 dashboard analysis, but it presents an issue when trying to use the attributes as a narrative in other ArcGIS template apps. Example, if I want to display {multiplechoicefield} in a details panel of Operations Dashboard. Or display {multiplechoicefield} in a story map. See image example of survey multiple choice > schema > table result. The name column specifies value; label is just the field alias. I realize I could do a one-time field calculation, or repeated manual, but can I automate? I do not know. There is a work-around but it is really a round-about way to get this: Calculate Hidden Fields to Remove Underscores. Again, I am asking for a better solution to how survey results could provide an additional "narrative/label" field for multiple choice questions. 
2 Comments
JamesTedrick

Hi Alexandre,

There are a couple of additional techniques that might address this:

1) You can use Arcade to transform the multiple choice question into something more appropriate for display in things like pop-ups.  Take a look at https://community.esri.com/groups/survey123/blog/2018/10/10/labels-for-multiple-choice-questions-usi... .  Unfortunately for one of your examples, Operations Dashboard does not yet support Arcade functions yet.

2) If the form is published using Survey123 Connect, you can use the r:choice-name() function to store the label of the choice selected.  See https://community.esri.com/groups/survey123/blog/2018/12/02/survey123-tricks-of-the-trade-xlsform-fu... for more information.

PamBond1

Thanks for the great Arcade workaround. Perfect.