Repeat group for predefined items

Hi KoBoToolbox Community,

I am building a form and I was wondering if it is possible to repeat a group of questions for predefined items?

I need to collect data on the consumption (quantity per day, times consumed per day, number of days per week) of predefined food items (rice, beans, bread, tortillas, tomatoes, etc., 40 in total) for two different groups inside a household (parents vs kids)(i.e. I don’t want to ask for each individuals but the total per group). See attached the original paper form I’m converting to better understand.

To avoid having to copy-paste multiple times the questions and having to modify each one to mention the name of the product I would have found it perfect to be able to have a list (maybe as a separate csv file or in choices?) of these items and then through repeat groups it would ask for each product. I work with XLSForms

I know I could do this with a matrix question type but as we collect data with smartphones with Enketo and the presentation of matrix questions in vertical mode is not satisfying/confusing, plus since there are >6 questions to answer for each items, even in horizontal it wouldn’t work well. Therefore I want to avoid using matrix question.

I searched through the forum but wasn’t able to find something similar.
Maybe is there a possibility through indexed-repeat? But since I’m not familiar with it and searching through the forum and the help center I wasn’t able to find a solution :smiling_face_with_tear:

Best regards

Welcome back to the community, @Vico! I too would see that the best option for you would be the matrix question but at the same time you oppose using the matrix question.

Or maybe using the repeat group could you not only use the grouped question that should capture all the variables? If that should work, maybe you will have to group 2 sets of question. One set for the parents and the other set for he children.

1 Like

Many thanks for your quick response @Kal_Lam. I just had time to read your answer but not to answer myself before going last minute on a short vacation.

I ended up copy-pasting the questions and adapting for each item.

Still, would it be technically possible to add this feature of being able to create repeat-group questions with a list of predefined items? Similar to what is done with indexed-repeat but without having to first answer another question and instead using this list.

Best regards

@Vico, you should be able to do it as outlined in the image shared below:

In the survey tab of your XLSForm:

In the choices tab of your XLSForm:

Image 2

In the settings tab of your XLSForm:

Image 3

Data entry screen as seen in Enketo:

Reference XLSForm:

Repeat Group in as Matrix Display.xlsx (13.4 KB)

1 Like