HOW TO

Limit the number of answer selections in ArcGIS Survey123 Connect

Last Published: November 22, 2024

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

  1. In ArcGIS Survey123 Connect, open the survey's XLSForm.
  2. 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.
  3. Configure the select_multiple question.
    1. 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.
The select_multiple question with list_soda under the type column.
  1. Specify a value in the name and label cells. In this example, the question is named 'fav_soda' and labeled 'Pick your favorite soda'.
The name and label cells specified in the survey worksheet of the XLSForm.
  1. 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
  1. For constraint_message, input a message to inform submitters of the limit.
The constraint and constraint_message cells specified in the survey worksheet of the XLSForm.
  1. Configure the answer choices.
    1. 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'.
    2. In the name and label cells, input the answer choices.
The list_name, name and label cells specified in the choices worksheet of the XLSForm.
  1. 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.

The alert notification when more than five selections are made.

Article ID: 000028422

Software:
  • ArcGIS Survey123 Connect

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options