Group repeat and random selection

Dear ODK community,

I am Mariam, currently I am trying to design a form for a survey on educational problematic in Armenia.
I am facing two problems in my form design and I will appreciate any guidance and recommendation on how to solve these issues.

  1. My first problem concerns group repeat function. In the beginning of the questionnaire there is a select_one question showing the outcome of first contact with household (choices are: I agree to participate, noone lives here, I refuse to participate, I can't participate because of health issues, etc). Please see the attached file. I am trying to repeat 12-31 lines based on the response of hh_contact_1 question. If household is not available or is refusing to participate, I want to repeat the whole process again, so the interviewer doesn't have to start a new form.

Issue#1.xlsx (13.1 KB)

  1. Second issues is the following. At some point in the interview respondent lists the training he/she has participated in. I need to randomly select no more than two of mentioned trainings and ask a block of questions regarding each of those. Could you please guide me how to design such a structure?

I am using Windows 7 on HP laptop. Thank you very much in advance. Looking forward to hearing recommendations from you!


Normally for household which are absent it would be recommended to start a new form. This way when you export your data, each line on the main tab refers to one household and you can quickly analyse the proportion of households which were available for interview. Do you have a particular reason to not want to do it that way?

For the trainings it depends slightly on whether the block of questions is the same for each type of training or varies from one to the next. However either way you need to calculate a random number as shown in the modified excel.

Issue1.xlsx (13.6 KB)

Random() creates a random number between 0 and 1. The once function means that this is calculated only once per household and does not keep changing throughout the survey. If there are 7 possible trainings for example I would then multiple by 7 and add 1. This will give a decimal answer which can be rounded down using the int() function. The result of this calculation can then be used in a relevancy calculation.

I hope this helps a bit but if it doesnt work as you need to let us know and hopefully it can be adjusted. If the form is related to the covid response there is also this service available for free should you need a few hours of time to answer questions or share guidance.


1 Like

Hi Noel,

thank you for your recommendations.

As you mentioned, it takes more efforts to analyse data if new form are nor used for each household. We wanted to use group repeat only for capital city center as the number of refusals is very high and we were trying to save interviewers' time. But at the end we decided not to do it, because it was complicating the form.

Your recommendations about using random() helped a lot. The form works perfectly.

Thank you one more time.