Frequently asked question

Is it possible to have more than one answer to a survey question to prompt the subsequent conditional question?

Last Published: April 25, 2020

Answer

Yes, it is possible to have more than one answer to a survey question to prompt the subsequent conditional question. This is done by configuring the relevant column of the subsequent question with specific answers to the current question.

An Accident Report Form is used as an example in this article. Based on the type of traffic accident, a subsequent question on the number of vehicles involved only appears if the answer to the current question is relevant. The question does not appear if the type of accident is a rollover or a single car accident, as this usually involves one vehicle.

Type of traffic accidentPrompt the subsequent question?
RolloverNo
Single car accidentNo
Rear-end collisionYes
Side-impact collisionYes
Multiple vehicle pile-upYes

Complete the steps below to configure the relevant column to prompt the subsequent conditional question.

For a select_one question

  1. In Survey123 Connect for ArcGIS, open the desired survey, or create a new survey using the Advanced template.
  2. In the XLSForm, configure a select_one question on the survey tab, and the answer choices on the choices tab. In this example, the select_one question is named accident and labeled Type of traffic accident, while the answer choices list is named accident.
A select_one question
The answer choices
  1. Create a subsequent field. In this example, the subsequent question is an integer type, named vehicles, and labeled Number of vehicles involved.
Create the subsequent question
  1. In the relevant column of the subsequent field, specify the relevant answer choices of the current question to prompt the subsequent question. Use the codes below to list the relevant answer choices separated by the word 'or'.
${select_one fieldname}='choice 1' or ${select_one fieldname}='choice 2} or ...
Specify the relevant column

In this example, selecting either Rollover or Single car accident in the select_one question (Type of traffic accident) does not prompt the subsequent question (Number of vehicles involved). However, selecting either Rear-end collision, Side-impact collision, or Multiple vehicle pile-up prompts the subsequent question.

Answer choices that do not prompt the next question.
Answer choices that prompt the next question

For a select_multiple question

  1. In Survey123 Connect for ArcGIS, open the desired survey, or create a new survey using the Advanced template.
  2. In the XLSForm, configure a select_multiple question on the survey tab, and the answer choices on the choices tab. In this example, the select_multiple question is named accident2 and labeled Type of traffic accident, while the answer choices list is named accident.
This is the select_multiple question
This is the answer choices
  1. Create a subsequent field. In this example, the subsequent question is an integer type, named vehicles2, and labeled Number of vehicles involved.
This is the subsequent question
  1. In the relevant column of the subsequent field, specify the relevant answers to the current question to prompt the subsequent question. Use the codes below to list the relevant answer choices separated by the word 'or'.
selected(${select_multiple fieldname}, 'choice 1') or selected(${select_multiple fieldname}, 'choice 2'), or ...
Specify the relevant column.

In this example, selecting any combination of answers that includes Rear-end collision, Side-impact collision, or Multiple vehicle pile-up in the select_multiple question (Type of traffic accident) prompts the subsequent question (Number of vehicles involved).

Combination with the specified answers prompt the subsequent question.

Article ID:000022505

Software:
  • ArcGIS Survey123 Field App iOS

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options