Counter within Repeat

03-22-2022 07:26 AM
New Contributor III


I am trying to capture field survey data for fish recorded in nets in Survey123.

Each lake can have multiple nets in it. Each net can have multiple fish in it. The fish must be associated with the net,  

I have created a survey that populates net details from a CSV, and then allows the user to record fish. A counter keeps track of the numbers recorded, and then does calculations on these. See below for counter.


The problem I am encountering is getting the Counter to reset when I want to add details for additional nets. Is there a way of resetting it once the data for one net has been recorded?

Has anybody any ideas on how to do this?

Thanks in advance,







0 Kudos
1 Reply
Occasional Contributor III

Lake (Contains count of nets)

-Net (Repeat) (Contains count of fish in net)

--Fish (Nested Repeat)

Is that correct? 
Why do you have once() included in one of your counts? That will prevent the count from updating as you add more fish/nets. 

If that's not your problem, you could make your "counts" relevant to some toggle-question, such as adding this to the relevant column:  ${recalc_toggle}='calculate_it_again' 

That would allow you to keep once() in your calc (assuming it's there for a reason) and give the user an option to recalc when needed instead of automatically. 


0 Kudos