Selected choices from 'Select Multiple' in Question 1 to be used in question 2

384
7
Jump to solution
03-09-2024 04:08 PM
Reuben
by
New Contributor III

hi,

I am in a situation where I want the choices selection in Question 1 (only the selected choices) to be 

re-used in Question 2. Any suggestion or hint would be greatly appreciated.

 

thanks

0 Kudos
1 Solution

Accepted Solutions
JenniferAcunto
Esri Regular Contributor

Set up your list so that each choice's name value also appears in a choice filter column. 

JenniferAcunto_0-1710157936746.png

Now we need to set up the actual choice filter for Question 2. Question 1 is a Select Multiple, which means the selected choices will be stored in a comma separated string such as red,yellow,blue. So the choice filter needs to be able to parse the stored answer to look for each choice's filter value. 

contains(${q1}, cf)

 

If the Question 1 response contains our choice filter value it will display the value. 

 2024-03-11_6-59-13.gif

 

- Jen

View solution in original post

0 Kudos
7 Replies
ChristopherCounsell
MVP Regular Contributor

What is question 2? How do you want them to be re-used? Like, select again?

You could use a choice filter, maybe see if you can filter to the same list:

https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-choice-filters/ba-...

0 Kudos
Reuben
by
New Contributor III

Hi Chris,

Question 2 is a 'Select One" Question Type.

0 Kudos
ChristopherCounsell
MVP Regular Contributor

Try setting up a choice filter on the select_one question that's filtered by the same values. Typically you'd have a number of choices filtered but you can just have one-one. So if the value isn't selected in the select_multiple question, it won't appear.

0 Kudos
Reuben
by
New Contributor III

hi Chris, 

I use this expression in the Choice Filter Column: selected-at(${C1_eco}, '${C1_eco}) where, I want to return Only the selected choices in Question 1. However, only one (the first selected choice) was returned. Others were not returned.

 

0 Kudos
ChristopherCounsell
MVP Regular Contributor

if C1_eco is the first question, the choice filter on question_2 should say

selected-at(${C1_eco}, filter)

Where filter is the name of the filter column you have added to your choices list. It can be a copy of the list.

e.g. here the filters are 'country' and 'region'. you could try the same but your filter would be 'city' and it'd be a direct copy of the list, a one to one match.

so add a column called 'eco_filter', copy the names from the list into it, then have your choice filter on the second question be selected-at(${C1_eco}, eco_filter)

ChristopherCounsell_1-1710036841191.png

 

ChristopherCounsell_0-1710036755627.png

 

 

0 Kudos
JenniferAcunto
Esri Regular Contributor

Set up your list so that each choice's name value also appears in a choice filter column. 

JenniferAcunto_0-1710157936746.png

Now we need to set up the actual choice filter for Question 2. Question 1 is a Select Multiple, which means the selected choices will be stored in a comma separated string such as red,yellow,blue. So the choice filter needs to be able to parse the stored answer to look for each choice's filter value. 

contains(${q1}, cf)

 

If the Question 1 response contains our choice filter value it will display the value. 

 2024-03-11_6-59-13.gif

 

- Jen
0 Kudos
Reuben
by
New Contributor III

hi Jennifer,

 

Thanks 

0 Kudos