Summary
In ArcGIS Survey123 Connect, a select_multiple question allows submitters to select multiple responses. In instances where the number of answer selections must be limited, the minimum and maximum limit can be configured in the XLSForm of a survey. As a result, submitters can only select multiple answers within the specified limit.
This article provides the workflow to limit the number of answer selections in ArcGIS Survey123 Connect.
Procedure
- In ArcGIS Survey123 Connect, open the survey's XLSForm.
- In the survey worksheet, under the type column, select the select_multiple option from the drop-down list to add a multiple-choice question that allows multiple answer selections.
- Configure the select_multiple question.
- Change list_name to a desired choice list name. Ensure the choice list name matches that in the choices worksheet. In this example, list_soda is specified.
- Specify a value in the name and label cells. In this example, the question is named 'fav_soda' and labeled 'Pick your favorite soda'.
- For constraint, input the following count-selected() function to set the limit for the number of answer selections. In this example, the expression limits the selection between two to five selections only.
count-selected(${fav_soda}) >= 2 and count-selected(${fav_soda}) <= 5
- For constraint_message, input a message to inform submitters of the limit.
- Configure the answer choices.
- In the choices worksheet, under list_name, input the name of the choice list name specified in Step 3a. In this example, the list name is 'list_soda'.
- In the name and label cells, input the answer choices.
- Save the XLSForm.
The survey cannot be submitted and the constraint message is displayed when the number of selections made is not within the specified limit.