Conditional requirements, but not using Relevant

03-30-2020 09:48 AM
New Contributor III

I'm building a survey for manhole inspections.  For a completed inspections, there could easily be 50+ fields with data.  However, there are very often times when we start an inspection but are unable to finish it, such as the manhole being surcharged.  

I currently have a question that asks, is the inspection complete?  If yes, then I need nearly all of those 50 questions to have values in them.  If no, I still want all of the fields visible and fillable, and the data saved and submitted.

Using the relevant function with groups will not work for this.  I need the workers to see all the possible fields even if the inspection is not complete.  I've spent a couple of hours on researching this topic and have been unable to find a solution that works for me.

I'm a really new to Survey123 and I'm not a computer whiz, so sorry if this is a beginner question.

0 Kudos
3 Replies
Esri Frequent Contributor

Hi Kory Steele‌. As you indicate, conditional statements on the relevant column are not the correct approach for this. First, because a question that is not relevant is always hidden, and you want the question to be visible. Second, because when a question is flagged as non-relevant, the Survey123 app will clear out its contents so users will be losing whatever they typed in.

I think what you can do is to use your conditional expressions in the required field.  The required field in the Survey123 Connect templates is pre-configured with a simple drop-down to say if the question is required (yes) or not (empty).  You can however type an XLSForm expression in there too. I am guessing that you could write something like  selected(${inspection_complete},'yes')  If the inspection is completed, then the question will be required. If not, it will not be required.

Would that work for you?

0 Kudos
New Contributor II

So I am actually trying to implement a conditionally required question and I could not do this unless I removed the data validation (only allows field from the list, i think it's yes or empty cell) from the Required field for Survey123 Connect from ArcGIS. The survey was created in version 3.9.

0 Kudos
MVP Frequent Contributor

The drop down just shows yes but you can but any true expression in there.  It does work.

0 Kudos