I asked this a while back to no avail and question came up again so I thought I'd try give it another try.
I'd like to make a question conditionally required, that is I would always like it to visible however if a previous question is answered a certain way I would like the question to be required. Does any one know if this is possible?
Here is a link to my original question: Survey 123 Conditionally Required Question
Solved! Go to Solution.
Hi. Yes. This has been implemented. Make sure you use Survey123 Connect version 3.11 or newer for this. This works in both the Survey123 field and web apps.
Attaching an XLSForm illustrating how this can be done.
type | name | label | required |
---|---|---|---|
select_one yes_no | nextrequired | Make next question required? | |
text | comments | Comments | selected(${nextrequired},"yes") |
Hi Brent,
Currently the relevant column doesn't support functions, so it isn't possible to have an optionally required question. We have it listed as an enhancement in our development queue and I'll add you request to the documentation for it.
Thank you James!
I also had this question and believe that adding that enhancement to require responses based on a previous question would be very beneficial and utilized on a majority of our surveys once available.
Thank you and keep up the great work.
Hi James,
Is there any update on the status of this conditional question enhancement to functionality for Survey123? If Esri want to make Survey123 a serious tool in context of others like SurveyGizmo etc, then this really is a must. I would imagine some large local government organisations (who use ArcGIS and AGOL) , especially those who run community engagement activities and currently use SurveyGizmo or Qualtrics, might consider 'switching' more staff to Survey123 - as it offers so much potential to capture community engagement on planning events and integrate better with ArcGIS and AGOL. Cheers
Hi Timna,
This was added in a recent release, actually! You can enter an expression into the 'required' column' of your survey, allowing a question to be considered required based on the input from a previous question. Check out the docs for examples: Form expressions—Survey123 for ArcGIS | ArcGIS
This seems to work as stated in Connect, but not when published as a web form. The question stays required, regardless of any other conditions in the survey.
Yes, this functionality doesn't currently exist in the web form, only in the field app.
Claire Proctor or Nick Dierks could you please provide an example of an if statement you used to get this to work?
Actually, I finally got it to work. The expressions are fully case sensitive. All field names must be entirely lowercase, and the if statement must use the choice name, not the label. Here's an example of what kind of if statement you would put in the required field on the survey tab:
if( ${doyoulikegis}='no','yes','')
In the above example, if you answer that you don't like GIS, you'd be required to answer the question to which that form expression applies (such as "Why don't you like GIS?")