Is there a way to cap the repeats/records but also not make that cap number required to submit?

950
4
04-21-2023 10:52 AM
clarklog
New Contributor II

I am doing bird surveys made up of 6 stops along a route. Ideally we can make it to all 6 but conditions may only allow us to get to 4 or 5 etc. The entire survey is a route and each stop is a new repeat/"record" within my survey setup and there are required questions within those stop. So you cannot hit the next arrow to start a new stop unless you have completed required fields for the first stop. I'm testing it out now and if I try to submit a survey with only the first stop filled out it won't let me and says "Record 2: this is a required question". In my excel form on Survey123 Connect, I do not have that "begin repeat" row as a required question, just the actual fields within that repeat/record have required questions. I have put 6 in the repeat count column of that row because I do not want surveyors accidently creating more than 6 records per route. I suspect this is causing my problem. Is there a way to cap the repeats/records but also not make that cap number required to submit?

 

 

Screenshot 2023-04-21 113933.png

0 Kudos
4 Replies
JoshuaSharp-Heward
Occasional Contributor III

Hi,

I've wanted to do this in the past and the best solution I found was to have an integer field outside of the repeat with a calculation set to count(${question_in_repeat}), and a constraint set to .<7. This means the user can do as many repeats as they want, but if they try to submit and they've completed more than 6 repeats it will stop them due to the calculated field being more than the number of repeats you want to limit them to. You can also set the integer field to bind::esri:fieldType = null to prevent it from being created as a field in the resulting feature class for tidiness.

IsmaelChivite
Esri Notable Contributor

I agree with @JoshuaSharp-Heward 

If you use the repeat_count column, you are essentially asking Survey123 to automatically add 6 records into your repeat. Since you have required questions in the repeat, the respondent must complete them all.

What @JoshuaSharp-Heward suggests gives you the option to add as few records as you want, but every record must be complete. I am attaching below an example and including an animation for clarity.

RepeatCount.gif

clarklog
New Contributor II

This worked. Thanks so much for the examples! I was able to copy those lines in to my excel and got it all to work the way I need

0 Kudos
clarklog
New Contributor II

Thank you this works!

0 Kudos