I am looking to specify a minimum number of records within a repeat in a survey. I know how to specify an exact number of records, but is there a way to say that any number of records is acceptable, as long as at least one repeat record is submitted?
I have several required fields within my repeat, but the problem is that users (general public using the web form) are clicking the '-' button at the bottom of the repeat section and deleting all their repeat records before continuing through the survey. They can then submit the survey with incomplete information because the required fields are no longer visible/validated. I believe they think this is button minimizes that section of the form.
Has anyone found a way to require at least one record in a repeat?
Solved! Go to Solution.
Yep I do this. See my post in here https://community.esri.com/thread/244944-limit-repeat-count-in-survey123-without-the-count-field-in-...
Basically you have a field with a value of 1 then use count(field) to get the number of repeats. Then you can put a constraint on that.
Hope it helps
Yep I do this. See my post in here https://community.esri.com/thread/244944-limit-repeat-count-in-survey123-without-the-count-field-in-...
Basically you have a field with a value of 1 then use count(field) to get the number of repeats. Then you can put a constraint on that.
Hope it helps
Thank you! I was doing basically that, but using sum() instead of count(). Summing a field that doesn't exist doesn't return a value (as is the case when all repeat records are deleted) so I was unable to get the constraint message to appear. Counting the responses instead of summing them works!
It seems now you can set 'yes' in the required field on a repeat and it will work for the 'at least one' use case, however unfortunately it doesn't go beyond that for a specific number.