HOW TO

Specify filter criteria based on previous answers in ArcGIS Survey123 Connect

Last Published: June 19, 2024

Summary

In ArcGIS Survey123 Connect, cascading multiple-choice questions allows dynamic filtering of choices based on previous selections. Some surveys may require excluding the choices selected in the first question from the options available in the subsequent question. Using a choice filter, survey creators can specify the filter criteria based on previous answers. This function prevents contradictory responses, creates a logical sequence of survey questions, and provides a more intuitive survey experience.

This article describes the workflow to specify filter criteria based on previous answers in ArcGIS Survey123 Connect.

Procedure

  1. In ArcGIS Survey123 Connect, open the survey's XLSForm.
  2. Configure the choice list.
    1. In the choices worksheet, under list_name, specify the name of the choice list. In this example, the list name is ‘sample_no’.
    2. In the name and label cells, input the answer choices.
The configured choice list.
  1. Create and configure the first multiple-choice question.
    1. In the survey worksheet, under the type column, click the drop-down arrow and select a multiple-choice question. In this example, select_multiple is selected.
    2. Replace list_name with the list name specified in the choices worksheet in Step 2(a).
    3. Specify a value in the name and label cells. In this example, the first question is named ‘first_sample’ and labeled ‘First sample’.
  2. Create and configure a second multiple-choice question.
    1. In the survey worksheet, under the type column, click the drop-down arrow and select the same multiple-choice question selected in Step 3(a).
    2. Repeat Steps 3(b) and 3(c). In this example, the second question is named ‘second_sample’ and labeled ‘Second sample’.
    3. In the choice_filter column, specify one of the following functions. The not() function removes the selected choices from the second list.
not(selected(${<first question name>}, name))
not(regex(${<first question name>}, name))
Note:
The functions can be applied to both select_one and select_multiple question types.
  1. Alternatively, for the select_one question type, the following function can be applied. The != operator indicates that the two values are not equal to each other.
name != ${<first question name>}
The configured multiple-choice questions.
  1. Save the XLSForm.

The image below shows the choices from the first question (Sample 1 and Sample 2) removed from the list of choices in the second question.

Choices selected in the first question removed from the second question.

Article ID: 000032754

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