Can't create if statement in required field?

2412
9
03-08-2019 06:43 AM
EricKnopf
New Contributor II

Hi - new to Survey123.  I looked through the previous questions and found an answer to what I want to do (create a conditional required question; see this similar question Making question conditionally required in Survey123 form? - Geographic Information Systems Stack Exc... ), but it seems my Survey123 Connect version (3.3.51) doesn't allow if statement in the required field? If I try to input anything other than <blank> or 'yes' from the drop down, I get an error saying "This value doesn't match the data validation restrictions defined for this cell".  In the above link, the version being used is an early version, so I would have assumed I would be able to do this?  Lost.  Anyone know what I can do?
Thanks.

**EDIT:**

It looks like there are a few things going on.  I couldn't write if statements simply because there was a data validation rule in place in Excel.  I deleted the rule and can now create if statements in the required field.  Unfortunately, this only puts an asterisk next to the question to indicate it is required, but doesn't actually require any input (when testing in connect and in the field app).  I also put an if statement in the relevant field as suggested below and put "yes" in the required field.  Again, marks the question as required, but doesn't actually require any input.  😐  
It must be something I'm doing wrong.

**EDIT 2:** 

It doesn't seem to work when the conditional required question is a 'select_one' or 'select_multiple'.  It works fine with 'integer'.  Haven't tested others.  That's unfortunate if this is the case.  Hopefully someone else can confirm or has a solution.

Tags (1)
0 Kudos
9 Replies
GeoJosh
Esri Regular Contributor

Try using your IF statement in the "relevant" field and selecting "yes" for required. The question will be hidden if not relevant according to your IF statement and will be required if it meets the condition.

Quick reference—Survey123 for ArcGIS | ArcGIS 

0 Kudos
EricKnopf
New Contributor II

Tried, didn't work.  I already had that set up and it wasn't working.  That's why I was looking to put the if statement in the required field.  It marks the question as required, but doesn't actually require any input.  I've also tried adding a setting to the constraints to require an input, but it ignores that too.

It must be operator error.

0 Kudos
KatherinePadilla
Occasional Contributor

I also have this issue.  There does not seem to be any pattern in my survey as to which fields are actually requiring the field to filled in or not.  I did a test on my survey by opening it, hitting send, then fix what it alerts me to, then try that again.  I continued this until it sent.  90% of my survey was not filled in and it was sent and I have required statements all over the place.  I have put my xls file here for hopefully an to try it out to see if you can recreate that issue and let me know if there is a solution.  Warning this survey is a beast (just under 1300 lines)

Thanks!!

0 Kudos
KatherinePadilla
Occasional Contributor

Here are some notes/observations.  Not sure if it will help or not.

0 Kudos
DougBrowning
MVP Esteemed Contributor
KatherinePadilla
Occasional Contributor

Thank you!!

0 Kudos
DougBrowning
MVP Esteemed Contributor

There is a kind of workaround in there.  Basically wrap the question in a group.

0 Kudos
KatherinePadilla
Occasional Contributor

ok...I am not sure what that means, as most of my questions are in a group already.  Could you please expand on that a bit or direct me to documentation that will explain that.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Opps forgot to post the link  https://community.esri.com/thread/231800-survey-allowed-to-be-submitted-when-required-questions-are-... 

 But basically it must be a group around the field directly above it.  So like only the first few fields in a group.  Mine was all tried up in repeats so your survey may be diff.  

Try creating a group around that one question and see what happens.

0 Kudos