I just updated to version 3.11 and am trying to implement a cascading select_multiple using choice_filters, which was added with this update (https://doc.arcgis.com/en/survey123/faq/whatsnewsurvey123.htm). However, I am having some problems. I have three levels of select_multiple questions. As an example, if options 8 and 9 are selected in question 1, two more questions appear with options 8.1, 8.2, 8.3, etc. and 9.1, 9.2, 9.3, etc. Then, if 8.2, 9.1, and 9.2 were selected in these questions, more questions would appear with options 8.2.1, 8.2.2, etc.; 9.1.1, 9.1.2, etc.; and 9.2.1, 9.2.2, etc. (see image).
Example of level I, II, and III questions
In practice, going from level I to level II questions works. If I select three level one options, three more questions appear offering level II values related to each level I option selected. Then, if I only select ONE level II option in a question, the level III options appear (see above), but if I select two or more, the question labels appear, but not the options.
Two level II options selected causes an error
Here is the syntax for the questions in the form:
| type | name | label | relevant | choice_filter |
| select_multiple threat_category | threat_cat_gen | General Threats: | ${threats}='Y' (there is a previous question called ${threats} asking if there are known threats to the species) | |
| select_multiple threat_invasive | threat_invasive | Specific Invasive & Other Problematic Species, Genes, & Disease Threats | selected(${threat_cat_gen},'32') | |
| select_multiple threat_invasive2 | threat_invasive81 | Specific Invasive Non-native/Alien Species/Diseases threats | (selected(${threat_cat_gen},'32') and selected(${threat_invasive},'33')) | filter=${threat_invasive} |
| select_multiple threat_invasive2 | threat_invasive82 | Specific Problematic Native Species/Diseases threats | (selected(${threat_cat_gen},'32') and selected(${threat_invasive},'34')) | filter=${threat_invasive} |
| select_multiple threat_invasive2 | threat_invasive83 | Specific Problematic Species/Diseases of Unknown Origin threats | (selected(${threat_cat_gen},'32') and selected(${threat_invasive},'142')) | filter=${threat_invasive} |
| select_multiple threat_invasive2 | threat_invasive84 | Specific Viral/Prion-induced Diseases threats | (selected(${threat_cat_gen},'32') and selected(${threat_invasive},'145')) | filter=${threat_invasive} |
Note that I also tried regex(filter, concat('.*', ${threat_invasive},'.*')) as the choice_filter (for those questions with one) and had the same issue.
Here are the choices in the choices sheet for level I threats:
Level I choices
Here are the choices in the choices sheet for level II threats:
Level II choices
Here are the choices in the choices sheet for level III threats:
Level III choices
I think it has to do with that when more than one level II options are selected, more than one number is stored in the second-level threat question (e.g., in ${threat_invasive}) and this is conflicting with the choice filter, but I don't know how to fix it. Here is the form validation when the level I threats selected are pollution and invasive species, and one level II option is selected for pollution and two are selected for invasives meaning the level III options are visible for pollution, but not for invasives:
"threats": "Y",
"threat_cat_gen": [
"32",
"36"
],
"threat_agri_aqua": null,
"threat_pollution": [
"39"
],
"threat_pollution91": null,
"threat_pollution92": null,
"threat_pollution93": null,
"threat_pollution95": null,
"threat_pollution96": null,
"threat_invasive": [
"33",
"34"
],
"threat_invasive82": null,
"threat_invasive81": null,
"threat_invasive83": null,
"threat_invasive84": null,
"destination_repeat": []
}
(Side question: why does threat_agri_aqua even appear here when it wasn't selected and the others that weren't selected are not listed?)
Is what I'm trying to do even possible? Or, do I need to make individual choice lists for every level II option (I hope not...there are a lot).
Thanks!