Repeat count within repeat group


The repeat function for me is working great for me! We are going to be able to collect some really great data. However, I am having one issue I was hoping you could help with.

I have a repeat group and within that repeat group, I want to display the count of the repeat in a label at the start of each repeat. I have tried to make a hidden value to calculate this multiple times, but it is not working. Here is what I have tried:

count(/data/repeat function question ID)
count(/repeat function question ID)
count(/data/question within repeat function ID)

None of these seem to be working. I also don't know if the location of the hidden value and the label make a difference i.e. if I want the label at the start of my repeat does the hidden value have to go at the end of the repeat?

Thank you for your help!


To display the position of the repeat you can use the function position, it will give you the position of each interaction. for example position(current()/..)

Please check more examples on the documentation