How To: Constrain Select Multiple response combinations in ArcGIS Survey123 Connect
It is sometimes necessary to restrict users from selecting certain response combinations for surveys that include Select Multiple questions in ArcGIS Survey123 Connect. This is to avoid inaccurate survey responses.
For example, in the survey form below, a Select Multiple question has four possible choices: Option A, Option B, Option C, and Not Option C. If choosing both Option C and Not Option C is not a logical response, it is possible to constrain these choices.
To constrain choices in response to a Select Multiple question in ArcGIS Survey123 Connect, follow the steps described below.
Note: In this example, both Option C and Not Option C are a restricted combination response in the survey.
- In ArcGIS Survey123 Connect, open the survey XLSForm.
- In the survey worksheet, in the type column, select the cell with the Select Multiple question (select_multiple <list name>).
- Create a constraint for Option C and Not Option C. For more information on using the constraint formula, refer to ArcGIS Survey123: Formula operators.
- In the constraint column, select the cell that is parallel to the Select Multiple question. In the example below, select E3.
- In the selected cell, type the following script:
not(selected(., 'option_c') and selected(., 'not_option_c'))
- Create a return constraint message when users select both Option C and Not Option C as a response.
- In the constraint_message column, select the cell that is parallel to the Select Multiple question. In the example below, select F3.
- In the selected cell, type the constraint message, as shown below.
You cannot select both Option C and Not Option C.
- Save the survey XLSForm.
- ArcGIS Survey123: Constraints
- ArcGIS Survey123: Formula operators
- Esri Community: Survey123 Tricks of the Trade: XLSForm functions for lists
Last Published: 5/5/2022
Article ID: 000020969
Software: Other Apps ArcGIS.Survey123.Connect