Survey123: Define a minimum repeat count

117
2
Jump to solution
10-22-2020 12:17 PM
AllisonMuise2
New Contributor II

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? 

Tags (2)
Reply
0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Frequent Contributor

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

View solution in original post

Reply
0 Kudos
2 Replies
DougBrowning
MVP Frequent Contributor

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

View solution in original post

Reply
0 Kudos
AllisonMuise2
New Contributor II

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!

Reply
0 Kudos