How to count list items (list field) nested in a Repeating Group

I have a Repeating Group of Camps with a lot of drop-down filters. Camps have a field, (Students), which is a list of Students. I am trying to get a total count of students for all Camps in the Repeating Group.

It is easy to get a count of the items in the RG, however I’m stuck on how to get a total count of the nested list of students for all Camps in the RG.

Hi @derek1

input a text element, use “do a search for” “:count” , and set the constraints to the values of the drop-down filters that have been selected. In this way, you’re not counting the items in the RG, but duplicating the results.

Would that work for your scenario?

Hope that helps

Hi @derek1
Try “rg’s camp’s student’s:count:sum”
The idea is to get the count of students per camp in a list then use :sum on it

Unfortunately, I can’t get it to work because in my case (Camps & Students), Camps can have many Students, and Students can be in many Camps. When I try to set contraints, I end up needing to constrain a list with another list. I’ve tried many scenarios and can’t get that to work.

It makes sense that would work, unfortunately, Sum is not an option in that scenario.

@derek1 Have you tried using the Advanced filter options as well?

You may want to check out this example of another complex setup: Multiple Filters to Refine Repeating Group

Do a search for: Students filtered advance student’s camp intersect with camp list count > 0 count


@lois.laput Thank you. You are a life saver! Thank you for the quick demo. The only difference was I did not have the “>0” in the Advanced Filter. It was preventing my filter from validating.

Thanks @Zaque. I need to spend some more time really understanding the Advanced Filter.

No problem! I’ll remove the app now, if that’s alright. :slight_smile:

This topic was automatically closed after 70 days. New replies are no longer allowed.