Using indexed-repeat on nth repeat group to get sum of responses

Hi all,

I have a repeat group containing a yes_no table and a relevant follow up question if 'yes' is selected. I'd like to count the number of 'yes' responses later on in the form but am running into the classic issue that necessitates the indexed-repeat calculation. I have a good understanding of the logic behind indexed-repeat but I need to use it for n-repeat groups.

Put more simply:
calculate=indexed-repeat(${neighbor_contamination},${adjacentLand},1} only grabs the first repeat group. How do I capture 4 repeat groups?

And perhaps how might I sum the total as well?

I've attached some sample data.

ona_geo_odk_test_3.xlsx (12.6 KB)

Haven't tested this, but sum(node} should sum all the nodes in the
repeat. https://groups.google.com/d/msg/opendatakit/_O6Rjj2ymgo/ju2AzWjdynkJ
might also be a useful thread to review.

Yaw

ยทยทยท -- Need ODK consultants? https://nafundi.com provides form design, server setup, in-field training, and software development for ODK.

On Sat, Oct 10, 2015 at 4:23 AM, igardner@tns.org wrote:

Hi all,

I have a repeat group containing a yes_no table and a relevant follow up question if 'yes' is selected. I'd like to count the number of 'yes' responses later on in the form but am running into the classic issue that necessitates the indexed-repeat calculation. I have a good understanding of the logic behind indexed-repeat but I need to use it for n-repeat groups.

Put more simply:
calculate=indexed-repeat(${neighbor_contamination},${adjacentLand},1} only grabs the first repeat group. How do I capture 4 repeat groups?

And perhaps how might I sum the total as well?

I've attached some sample data.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.