Summary
In an ArcGIS Survey123 survey form, it is possible to have users provide multiple responses to a question and displaying the question's unselected responses can be helpful for data management. For example, unselected answers from a survey regarding plant species in a pond provide information on the plant species absent in the pond.
This article provides the workflow to display the unselected choices from a survey question in ArcGIS Survey123 Connect.
Procedure
- In ArcGIS Survey123 Connect, open the survey's XLSForm.
- Create and configure a select_multiple question.
- In the survey worksheet, under the type column, select select_multiple list name and replace list name with the name of the choice list. In this example, the choice list name is ‘plants’.
- Specify a name for the question in the name column and the question to be displayed in the label column. In this example, the question is named ‘plant' and labeled 'Select Plants in Pond'.
- Navigate to the bottom of the worksheet and click the choices worksheet.
- In the list_name column, specify the choice list name created in Step 2(a).
- In the name column, specify the name of the list. In this example, 'pickerel', 'thalia', 'lotus', 'waterlilies', 'moneywort', and 'cabomba' are used.
- In the label column, specify the value to be displayed in the survey. In this example, 'Pickerel', 'Thalia', 'Lotus', 'Waterlilies', 'Moneywort', and 'Cabomba' are used.
- Create and configure the text question with calculations.
- In the survey worksheet, under the type column, select text.
- Specify a name for the question in the name column and the question to be displayed in the label column. In this example, the question is named 'unselected' and labeled 'Plants not in Pond'.
- In the calculation column of this question, specify the expression using the if(condition, a, b) function to calculate and display the unselected choices in the survey.
concat(if(selected(${<select_multiple_name>}, '<choice_name1>'),'','<choice_label1>, '),if(selected(${<select_multiple_name>}, '<choice_name2>'),'','<choice_label2>, '),if(selected(${<select_multiple_name>}, '<choice_name3>'),'','<choice_label3>, '),
if(selected(${<select_multiple_name>}, '<choice_name4>'),'','<choice_label4>, '),if(selected(${<select_multiple_name>}, '<choice_name5>'),'','<choice_label5>, '),if(selected(${<select_multiple_name>}, '<choice_name6>'),'','<choice_label6> '))
- Save the XLSForm file.
- Click Publish to publish the survey form.
The ArcGIS Survey123 survey form below shows the text question field populated with the unselected options from the select_multiple question.