Hi,
I have an integer question for which the answers can only be: 1, 2 or 3. It is not a required question (its within a repeat) so I have the default set to zero to avoid calculation errors (several questions with these answers -- calculation question with a sum divided by the count).
I have used the "spinner" for the appearance of the question, and the default, "0," shows up when I view the form (I haven't published it yet), but when I hit the plus sign, I can continue past 3 (4, 5, 6, etc). Here is what I have in the constraints column for this question:
. = 1 or . = 2 or . = 3
Is this the proper syntax, or am I missing something?
Thank you in advance!
-Susan
Solved! Go to Solution.
Okay! I "solved" the problem on my own -- apparently, there are different ways of evaluating constraints - in the form upon entry, OR upon submission of the survey. The syntax above is correct. I was also only testing the survey within the Survey123 Connect environment as well, which may not entirely behave as survey form on in the field app. I published a test survey with an integer question with all the above parameters, downloaded it to my phone, and tried to enter the number "4" -- and it would not let me -- and it displayed the constraint-message as well ("Please enter 1, 2 or 3"). 😉
Okay! I "solved" the problem on my own -- apparently, there are different ways of evaluating constraints - in the form upon entry, OR upon submission of the survey. The syntax above is correct. I was also only testing the survey within the Survey123 Connect environment as well, which may not entirely behave as survey form on in the field app. I published a test survey with an integer question with all the above parameters, downloaded it to my phone, and tried to enter the number "4" -- and it would not let me -- and it displayed the constraint-message as well ("Please enter 1, 2 or 3"). 😉
And, I forgot to add, the "appearance" column/field must be left blank -- the constraint won't work with the spinner (or calculator, etc.)