Select to view content in your preferred language

Survey123 required - make valid only within a group?

616
2
09-14-2023 04:23 PM
CyndyJBresloff
Occasional Contributor

I have a Survey123 app I am building, that is an inspection form I would like to use across a few different asset inspection types.  I have set up the survey to have groups; the idea being, a user selects the tab of a certain group depending on the type of asset they are collecting data for.  I would like to, within each individual group, ensure that all survey questions *within that group alone* are answered, but the user does not / should not need to fill out the 'required' questions of all the other groups.  (I hope that gives enough clarity of what I am asking).  Can this be done in Survey123 Connect, this level of constraining the scope of 'required' being set to a yes? 

Tags (1)
0 Kudos
2 Replies
Savannah2019
Regular Contributor

If you add a question at the beginning asking if they performed a certain inspection and if they answer yes, then make the questions for that group conditionally required. So in the required category, instead of just writing "yes", write: selected(${Question},"AnswerYoureLookingFor") 

You might even want to put that phrase in the relevant category for the group, so the group doesn't even appear unless they've done that inspection.

See my photo for an example. I have the Flushing Test group hidden completely unless the user selects that a Flushing test was performed. Then the first question in that group, the Start Time, is only a required question if the Flushing Test question was answered "yes"

abureaux
MVP Frequent Contributor

Another option is you could have a select_multiple which dynamically shows/hides the groups via the relevant column. When something is no longer relevant, its 'required' status is ignored (aka, if you set required=yes for a question but it is also being hidden by a relevant statement, the required part is ignored).