Looping set of questions in in a new repeat count to a question in a previous repeat count

Hi, I am trying to build a survey form in a way that i will loop questions in in a new repeat count to a question in a previous repeat count. i have used indexed-repeat(), with both the name of the question i want to loop to, the name of the repeat count i am looping to and position(…) function but i am still not able to fill the form on phone. it’s given me problem like the "field is repeated, you may need to use indexed-repeat function please help .

Can you please post a small form that reproduces this issue? Or if you can share the whole form, that would also allow someone to help you troubleshoot.

this is the formnassco_script.xlsx (42.3 KB)

Hi @matolab,

Welcome to the Forum!

I tested your form in enketo but could not see the error. Can you kindly confirm at which point/question you are seeing the problem?

Meanwhile, I took a look at your form and noticed you were referencing the wrong variable in the labels of B2-3-4-5... I think you meant to recall the name of the people in the household roster, so instead of the static ${A1} you should replace ${name2}. (Attached edited version)nassco_script.xlsx (38.4 KB)

The same suggestion applies for other variables and loops in the following rows.
E.g. Section C should also be looped, but you are using 'In which grade is (NAME) currently enrolled' instead of referencing a variable.

Other couple of suggestions:
i) you might want to include the repeat_count option, e.g. count(${A1}) to avoid inconsistencies in the number of data points collected for the household roster;
ii) there seems to be calculations included in cells O47-O50, which are not needed for the type of variables selected;
iii) the Admin data collected in questions A-Ha (rows 8-24) seems quite lengthy and tricky as there is no validation for them. You might find it useful to create some lists of geographical information so that the user only need to select the option as a drop-down instead of typing the answer. In case you have a long list of options you can use an external support file (in .csv format). This should help minimizing the errors and inconsistencies.

I hope this helps!



My problem is perfectly solved with this response . thanks

1 Like