# How to use Indexed-repeat

The xlsform is attached for your reference.

Hi @fsimon23,

Here is a simple example to demonstrate indexed-repeat:

In the survey sheet of your xlsform:

In the choices sheet of your xlsform:

See the support article for more details on Grouping Questions and Repeating Groups.

Thank you Kal_Lam. I hope that explains a lot.

1 Like

index_repeat . its not supported i one to create household roster
giving integer field for total value to repeat group

repeat group hhmem
group mem
b_1_1, name
b_1_2 \${b_1_1} age
select_one b_1_3 \${b_1_1} sex
end group
repeat group extra_info
b_2_1, \${b_1_1} study
b_2_2 \${b_1_1} income
end repeat extra_info
calculate name---------------- \${b_1_1}
calculate age---------------- \${b_1_2}
calculate male---------------- \${b_1_3}=1
calculate female---------------- \${b_1_1}=2
calculate child ---------------- \${b_1_2}<=6
calculation name1----\${b_1_1}>=1-----------concat('ID: 1: ‘,indexed-repeat(\${b_1_1},\${hh_mem},1),’ Age: ',indexed-repeat(\${b_1_3},\${hh_mem},1))
calculation name2----\${b_1_1}>=2-----------concat('ID: 2: ‘,indexed-repeat(\${b_1_1},\${hh_mem},2),’ Age: ',indexed-repeat(\${b_1_3},\${hh_mem},2))

select_one hhmem—p1— select one person for interview

while i am using this it always show index error in b_1_1 only when i am using prompt
Help

or u can email me in surav.bas29@gmail.com

Hi @suraz,

Seems like you are looking for something that has already been discussed in the previous post:

Have a great day!

1 Like

Hello,

I am trying to follow the indexed-repeat example you shared above in my current survey, but the second roster (should be equivalent to your education roster) is not working. When I load the survey, the roster always shows the number 5 where a name should appear.

Essentially, I am collecting a list of organization names, and then I would like to ask a number of questions about each organization. The first repeat group just collects the names. The second should ask questions about these organizations.

However, when I load the survey where I expect the organization name to appear, the number 5 always appears. The number 5 appears in every repeat instance in the second group when I enter information about more than one organization in the first group.

As I am a new user it looks like I can’t upload my survey example, but I’m more than happy to email it to someone in the Kobo support team if the issue is not clear based on my description.

Thanks,
Kelsey

Hi Kal_lam,

In this example of indexed-repeat, what if I want the next questions (education information) to be repeated for only those aged between 6 and 18 years. How would you go about it?
Thanks
Mathias