Hello, Survey123 Experts:
contains() returns true and false. Choice filter is doing a lookup query.
The last line looks right but the contains line would just calc to True. That does not tell 123 what to go fetch.
Use the method in line 5. You can build more complicated queries or add more columns to use in filtering.
I think that is what you are seeing.
Thanks Doug. This clarifies why the Contains() function wasn't yielding anything. I'm unfamiliar with the syntax rules for lookup queries. Is there some other way you know to implement a similar function where a single choice would be made available for any of several select_one responses to a prior question? I'd like to avoid the method in line 5, if possible because of the need to duplicate some choices multiple times for each acceptable response. This table is just an excerpt of a much larger series of questions, but full implementation would yield a cumbersome and redundant long list of choices.
Some of it was setup before me so there may be another way but I didnt find one. On my big form with choice list of 5,000 they are all external_choices. So I use multiple columns to break up the list different ways.
So my external choices looks like
Then my choice filter does things like this
if I want all of them I do
fulllist=${fulllist}
If I want just Woody I do
Type=${woody}
If I want some combo I do
Type=${woody} or Type=${herb} or Type =${unknown}
Or even
Foliar=${fulllist} or Type=${none}
One trick is it will not take text for some reason
So Type="Woody" will not work
So I just made dummy fields like this
But I am not basing any of this on a previous field so that gets harder.
For you it depends how many combinations you have. You could make more columns instead of rows
So a column of M with a Y in it. Then a second column called E with Y in the right choices, etc.
But looking at yours I am not sure you can use a field name as the column filter name? James may know.
So filter = ${wlsystem} turns into ${wlsystem} = "Y".
I guess it is tough without knowing your workflow.
Other times I just allow them to add bad values then check it with a constraint instead.
I would also read this page
Cascading and external selects—Survey123 for ArcGIS | ArcGIS