Select to view content in your preferred language

Using Cascade Select on Select Multiple - Need to filter choice list using the same choice list

1480
4
Jump to solution
08-01-2022 10:12 AM
mrosekulick
Occasional Contributor

Hello! I am working on a Survey123 form for a Bat Survey. 

I have two fields with the same multiple select choice list: Known Species and Potential Species.

I'd like to filter the Potential Species field to not show any choices that are selected in the Known Species field.  

I'm struggling with how to do this - thanks for any help!

 

0 Kudos
1 Solution

Accepted Solutions
ZacharySutherby
Esri Regular Contributor

Hello @mrosekulick

The select_multiple samples available in the connect sample demonstrate displaying choices, but including a not() function around the function removes choices from the list. I've attached a sample that demonstrates taking choices out of a select_multiple list. 

Thank you,
Zach

View solution in original post

0 Kudos
4 Replies
ZacharySutherby
Esri Regular Contributor

Hello @mrosekulick

We have a sample available in Survey123 Connect that demonstrates cascading selects and there are a few samples in there that demonstrate configuring a choice list with select_multiple questions. You can use the selected() function or a regex() expression to do the filtering. 

Please also check out Ismael's Choice filters Esri Community blog: https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-choice-filters/ba-...

The important note from that is "If the expression evaluates to true, then the choice is kept. If the expression evaluates to false, the choice is dropped."

Thank you,
Zach
0 Kudos
mrosekulick
Occasional Contributor

Thanks, Zach! I found the sample, which is super helpful! It doesn't quite cover the scenario I have.... Basically I want to find a way to say "If KnownSpecies contains xyz choices, then don't display xyz choices in PotentialSpecies". I think I'm struggling because they are both select_multiple fields and I'm not sure how to phrase the syntax. I'm also a little rusty in Survey123. 🙂

Thanks again!

0 Kudos
ZacharySutherby
Esri Regular Contributor

Hello @mrosekulick

The select_multiple samples available in the connect sample demonstrate displaying choices, but including a not() function around the function removes choices from the list. I've attached a sample that demonstrates taking choices out of a select_multiple list. 

Thank you,
Zach
0 Kudos
mrosekulick
Occasional Contributor

That did the trick! Thank you so much!!

0 Kudos