Limit choices depending on previous answers

817
6
01-29-2019 04:58 AM
AmandaSandström2
New Contributor III

I have a survey with multiple repeats and they are somewhat connected. Lets say one repeat is for general information about areas, and that every area you create gets a number (1, 2, 3, 4.... 100) which the user selects from a select_one list. Then there is another repeat for species and for every species you should select which area it was found in (1-100). I would like to make sure that when you select which area the species was found in you only get a list of the areas that are created so far (if there are 5 repeats for areas I only want the numbers 1-5 to be selectable instead of 1-100). Is this possible? 

Tags (2)
0 Kudos
6 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Amanda,

There currently isn't a way to implement this in Survey123 - this would require an enhancement to the choice filter capabilities.

AmandaSandström2
New Contributor III

Hi James,

Thank you for your answer. Do you think this will be possible in future versions of Survey123?

0 Kudos
AmandaSandström2
New Contributor III

Btw could you help me with this if statement?

if((${pine}=5 and ${sum_not_pine}>0), 1,if((${contorta}=5 and ${sum_ej_contorta}>0), 2,if((${broadleaved}=5 and ${sum_not_broadleaved}}>0), 3,if((${sum_all}=5, 4,0)))))

You are allowed a maximum total of 4 plants (there are different types of plants to choose from). The exception is that you are allowed 5 pine, 5 contorta or 5 broadleaved; but just separetly, not combined - for example 5 pine is okay but 3 pine and 2 contorta is not okay.

I have a message that I have put as relevant if any of these rules are broken. I have a problem to get the if statement to work though, as it is now it pops up as soon as the total of plants are 5, even when it is one of the exceptions.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Amanda,

If you want the case where 4 total when mixed, shouldn't the sum_all comparison be against 4, not 5?

On the choice list enhancement, there is not a specific timeline to provide full expression support (which is what I believe is being asked in order to generate the comparison you are asking).

0 Kudos
AmandaSandström2
New Contributor III

Hi James,

sum_all should be >4 I guess. The problem still is that I only want it to check if sum_all >4 if any of the other if statements aren't true. 😕 Is that possible?

0 Kudos
AmandaSandström2
New Contributor III

Never mind, I managed to solve it.

0 Kudos