Repeat a group of questions according to male or female

Can you help me please.
Here is a case

Q1. What is your gender.

Section 1: Question reserved for men
Q2. Age
Q3. Educational level
Q4. Religion

Section 2: Question reserved for women
Q5: Age
Q6: Educational level
Q7. Religion

We are in a household or school, we want to start recording our targets which are men and women. I want to create a mechanism if I ask the question to know the sex if the person is male directly section 1 activates and I record it just after saving it the question Q1 still comes back if I am told that he is a man section 1 comes back again or is repeated again at the end I am asked the same question Q1 to choose the sex if it is a woman section 2 is activated at the end the question Q1 must appear again for choose the person I should register again and so on. Like a loop story.
Thank you

Hi @diniero69,

Looks like you need to use nested repeat group to get this, if I understand your scenario.

You should ask Q1 in first level repeat group. Then, have another two repeat groups inside the first level repeat to ask Section 1 and Section 2 questions. You may need to use if() function in the relevant column of xlsform to determine which nested repeat questions (for male or female) to go for asking. In this way you can again ask Q1 to go again to male or female questions (nested repeat).
Good luck !

Thank you

Can you make me a little xls file to see how it works?

Hello @diniero69,

Try out this xlsform in this link
SampleOne.xlsx (12.1 KB)
You see two plus(+) sign to decide whether you want to add number of male/female repeat set or Q1 to add first level repeat set that carries both section 1 and section 2 repeat sets.
Good luck.

Thank you, it work. Thank you so mutch , I'm very happy. God bless you.

1 Like