Survey123 Dashboard select multiple and counts

1758
3
06-04-2019 03:43 AM
EricS
by
Occasional Contributor

What is the best practice for this:

In my survey I have a select multiple question.  We are now trying to integrate a dashboard with the survey and we need counts (Indicator element) of that select multiple question.  Is there a way to parse out what we need or do we have to reconfigure the select multiple question to a select single question(or something else).  Example:  select multiple question answer is food, water, shelter all in one field.  Can I get the counts of every time food is part of the answer or water is part of the answer?

Thanks

Tags (2)
3 Replies
DougBrowning
MVP Frequent Contributor

Yea the way select multiple are stored makes it hard to use later.

You can do the counting in the form - like this

countfire    if(selected(${field} ,"fire",1,0)    then  bind to int

The main issue here is that if you ever change the data later in the Feature service and not in the form the counts will all be wrong.

I think it would need to be a Ops Dashboard change.  We have someone here that really wants to point that field to a pie chart and see a breakdown.  But it cannot handle the format.

Other idea is to put it in a repeat and use Arcade but that it is not in dashboard yet.  I do this in a webmap now.

Hope that helps.

AurelieShapiro
Occasional Contributor II

So the way I do the dashboard is to use the web app builder dashboard template - you can then use the count, query  widgets to search strings in a field, for example FIELD_1 contains "food." 

Unfortunately (and this is so stupid it's enraging) the ESRI Operations Dashboard tool makes great interactive dashboards but does NOT have the option to search strings! only select a value, so if you have multiple choice answers you would need to actually write out every possible entry which is when you give up and resort to WAB and wish ESRI would make a useful dashboard tool!

GillianElliott
Esri Contributor

Hi Eric,

This issue has been raised to technical support before, and this is the public explanation:

"Selections made for a select_multiple question are stored as a comma-separated string. This is a known limitation of select_multiple questions.

In order to query the selections individually, each selection can be separated out to its own question. This can be achieved using if() statements with the selected(question, value) function. These additional questions can be hidden if necessary.

This technique is described in the following GeoNet blog (refer to the "Controlling how user selections are stored in ArcGIS" section):

https://community.esri.com/groups/survey123/blog/2017/08/30/understanding-multiple-choice-questions-...

Additional information on these functions is available in this blog post:

https://community.esri.com/groups/survey123/blog/2018/12/02/survey123-tricks-of-the-trade-xlsform-fu...

I hope this is helpful on the Survey123 form side of things. Additionally, there is a new enhancement logged for a change in Operations Dashboard: ENH-000129890 - "Allow for the indicator widget in ArcGIS Dashboard to parse through a string field that was created by a 'select_multiple answers' question in Survey 123, so that the widget accurately counts the number of times each answer occurs." While it has not yet been decided whether or not this enhancement will be implemented, you can always call in to Technical Support and ask that it be attached to your account.

Thank you,

Gillian