How to use Indexed-repeat

Please help me how to use indexed-repeat() as i’m unable to proceed further in the testing.
The xlsform is attached for your reference.

Sponsorship_Survey - Revised.xlsx (28.8 KB)

Hi @fsimon23,

Here is a simple example to demonstrate indexed-repeat:

In the survey sheet of your xlsform:
image

In the choices sheet of your xlsform:
image

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
thank you for your help

Hi @suraz,

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

Have a great day!

1 Like