I'm hoping to create a pop-up note when a selected response is not within a list of set responses. I believe it is possible using the selected(question,value) formula in the relevant column and some sort of substring search, but am not sure what the syntax might be.
The survey is for plant species, and I would like to pop up a warning if the user records a plant that is not within it's known range (list of counties). My thought is that I can have the user select the county they are in, and then use that response to search for a match in the range list. I think the structure might be something like: selected(${County}) %in% Range, but I don't know how to go about a substring search in Survey123 syntax.
type | name | label |
text | example | Example |
select_one county | County | County |
begin repeat | plantList | Species |
select_one species | species | Select Species: |
note | | outside known county |
end repeat | | |
Survey Tab
example of species data from choices tab
list_name | name | label | Range |
species | Pseudelymus_saxicola | Pseudelymus saxicola | Beaver, Box Elder, Cache, Carbon, Daggett, Davis, Duchesne, Emery |
species | Abies_sp. | Abies sp. | Cache |
species | Achnatherum_parishii | Achnatherum parishii | Carbon, Dag |