Select to view content in your preferred language

Multiple choice relevant select / regex

588
1
Jump to solution
02-08-2024 08:06 AM
HarrietBranson
Occasional Contributor

I have a Survey123 that has a multiple choice question asking what you are going to do with the fish you catch. The answers include: sell, eat, donate, make bait, salted. The next question asks for the price of fish, but only need to appear if "sell" is chosen in the previous multiple choice. Regex with pipe "regex(${uso2}, "sell|eat|bait|salt|donate")" works to make the next question appear no matter the combination of inputs, but also obviously shows the price question even if sell is not selected.

Is it possible, without investigating every single possible combination of answers and writing them in a very long-winded selected formula to set a condition so that if "sell" is selected amongst any answer the price of fish question shows up (and so that if sell is not selected, the price question does not appear)?

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

Selected should work for this.  

selected(question, value)  Checks whether answer is selected. This function is used for select_one and select_multiple questions    selected(${question_one}, 'a')

hope that helps

View solution in original post

1 Reply
DougBrowning
MVP Esteemed Contributor

Selected should work for this.  

selected(question, value)  Checks whether answer is selected. This function is used for select_one and select_multiple questions    selected(${question_one}, 'a')

hope that helps