How do I create a list of choices based on previous response in Survey123?

3930
5
Jump to solution
04-25-2017 06:38 AM
AlekKreiger
New Contributor III

Is there a way to create a list of choices for a select_one type question that is comprised of selections made in previous select_multiple question? There may be one or multiple selections made in a response to a previous question.  I would like to retrieve those responses and offer them as the list of possible choices for a select-one type question (e.g. which one of the choices that you've just selected is the most important?).

I'm attempting to use cascading selects by essentially repeating one choice list under a different list name (similar to screenshot below) but this isn't restricting the subsequent choice list to the previously selected choices. 

Another option is to use an expression in the constraint column to restrict the valid response to one that matches any of the previously selected choices.  In this scenario the same entire list would be displayed as possible choices but the one valid response would be limited to those selected in the previous select-multiple question.

I am using Survey123 Connect version 1.10 and will be collecting survey responses via the web app.

Any help is much appreciated.  Thanks.

Reply
0 Kudos
1 Solution

Accepted Solutions
AlekKreiger
New Contributor III

Turns out it is rather simple (if you are using the same choice list in both questions).  Use the following expression in the choice_filter field of the .xls:

selected(${field_name}, name)

See example below:

Note:  This solution seems to apply only to surveys accessed via the web client.

View solution in original post

5 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Alek,

There isn't a way to currently do this.  It looks like the method you're proposing would involve having the choice_filter column support functions, which it currently does not.

Reply
0 Kudos
AlekKreiger
New Contributor III

What about using a regular expression in the constraint column to ensure the selection of a select-one type question matches one of potentially many selected in a previously answered select-multiple type question?

Reply
0 Kudos
PhilipMarty
New Contributor III

Are there plans to add this functionality, and if so what would the timeline on that be? This is for having a multiple-select (question1) and a multiple select (question2) with a choice filter on question2 for what was selected in question1. Is there a work-around you can think of for it in the mean time?

Reply
0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Philip,

We don't have a definite timeline for supporting functions in choice_filter, but it is an enhancement we do want to support in Survey123.

Reply
0 Kudos
AlekKreiger
New Contributor III

Turns out it is rather simple (if you are using the same choice list in both questions).  Use the following expression in the choice_filter field of the .xls:

selected(${field_name}, name)

See example below:

Note:  This solution seems to apply only to surveys accessed via the web client.

View solution in original post