0

When building a survey in Survey123, you can choose whether or not to make a question required. But how do you make a question conditionally required? For example, you have the following questions:

  1. Do you like GIS? (Yes or No?)
  2. Why not? (Required if the answer to Question # 1 is "No")
4

This capability has only recently been made available in Survey123 Connect for ArcGIS. The version I'm working with is 3.0.142. If this solution does not work for you, upgrade to the latest version.

When you create a survey, you will need to make sure your field names are all lowercase. If you have a question that you only want to be required conditionally dependent on the answer to a previous question, ESRI has introduced Form Expressions for this purpose.

When writing a survey question, you now have three options with regards to the required column:

  • blank: Not required
  • "yes": Required
  • Form Expression: Conditionally require using an If Statement. The If Statement is case sensitive!

To address the example asked in the question, the If Statement would look something like this:

if( ${doyoulikegis}='no','yes','')

Here's what the form looks like in Excel: Survey123 Form Construction in Excel

Here's what the form looks like in action, with each yes and no selected: Survey123 Form showing Question 2 isn't required when Question 1 = yes Survey123 Form showing Question 2 is required when Question 2 = no

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.