Constraint not working?

416
7
11-08-2019 05:25 AM
Highlighted
New Contributor

I'm new to Survey123. I have some simple constraints in version 3.6.137 as shown below.

However, when I enter wrong data an error is not generated. What am I doing that is not correct?

 

Reply
0 Kudos
7 Replies
Highlighted
MVP Regular Contributor

It might be a bug, I'm seeing the same thing in 3.6.137 as well as 3.5.166. Unfortunately, I don't have an even older installer to see if it was working at some point.

Reply
0 Kudos
Highlighted
Occasional Contributor

Hello Grattan,

In your screenshots (where the errors do not occur), have you submitted the survey? Or are these taken before the survey is submitted. In my testing, I am finding that the constraint message only appears after I try to submit a survey with an invalid record. 

Best,

Megan

Reply
0 Kudos
Highlighted
New Contributor

Hi Megan,

No I did not submit. I assumed that the error would be shown before moving on to another question.

Reply
0 Kudos
Highlighted
MVP Regular Contributor

I thought it used to validate immediately, though I haven't used constraints a lot. There seems to be some recollection here as well that it used to be immediate, though they noticed it varied with field type: Survey123 Connect .>now() constraint not working Johnathan Hasthorpe‌, can you confirm the status of the constraint functionality?

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

Hi Grattan, Chelsea Rozek

As Megan indicated, validation handling was changed in 3.5 to validate when a submission is attempted.

Highlighted
New Contributor III

Hi,

Someone recently added an ArcGIS Idea for that:

 

Please consider voting it up if you'd like to have the constraint validation immediately, and not only when you submit the form.

Léo

Highlighted
New Contributor

is there any documentation about how to define Constraints? syntax etc

Reply
0 Kudos