Counter within Repeat

203
1
03-22-2022 07:26 AM
IFI
by
New Contributor III

Hi, 

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.

IFI_1-1647959073186.png

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,

Paul

 

 

 

 

 

0 Kudos
1 Reply
DerrickWestoby
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