How to get the serial number at every question in repeat group?

Hi Team,

I have attached the screenshot of the repeat group form.
So in the question Battery No. , I need serial number in display text.
Example:- Battery No. 1, Battery No. 2, Battery No. 3 etc.

Please help me to resolve it.

Thanks & Regards
Zeeshan Ahmad

You can use position(..) function to get the index of current iteration inside a repeat group.

Remember position(..) function is 0-index, so for first loop of repeat repeat-group, its value is 0, and for second loop, its value would be 1 and so on.. So you can store the position(..) in a hidden variable's (call it X ) calculate condition and add another variable Y whose calculate condition is 'X+1' (sort whats shown in screenshot) .

Link to position(..) documentation

It's working.

Thank you so much