Relevant only for individuals who replied yes to the question before and who are older than 10

Hello,

I need some help with a problem I am facing with ODK xlsform. Any help would be greatly appreciate it.

1. What is the problem? Be very detailed.
I am creating a household survey. At the beginning of the survey I ask the names, gender and age of each individual in the household. I then want to understand the pregnancy status of females in the household. For this, I ask "Has anyone in your household been pregnant or given birth in the past 30 days?". The next question asks to select the name (from a list of names previously provided of every individual in the household) of the individual who is pregnant.

For this question I want to have a three-fold relevant statement that makes this question show only if:

  1. Yes was replied to the previous question
  2. Only females names are shown in the list
  3. Only individuals who are older than 10 years old are shown.

3. What you have you tried to fix the problem?
I have tried adding multiple relevant statements connected by & but it does not work

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
I have attached a sample of the xlsform to better show the problem. The rows of interest on the pregnancy status are highlighted in bright yellow.
Test_ODK-forum_26112020.xlsx (14.6 KB)

Any help would be very appreciate it and I would like to thank you in advance for your time.

Best,

olimpia

Hi @Olimpia,

maybe the two following posts could help you

Hi Aurelio,

Thank you for your reply. I came across those questions already and I think that unfortunately it won't solve my problem. I have used the suggested answers to create a list of people entered in the multiple questions. However, when I try and add this in the relevant column for pregnancy it gives me an error.

I have been adding it in the relevant column like this: (${hh5_2_currently_pregnant} = 'yes') & (indexed-repeat(${hh4_1_age}, ${function_repeat_hh_mem_details}, position(..)) >=10) & (indexed-repeat(${hh4_2_gender}, ${function_repeat_hh_mem_details}, position(..)) = 'female')

Do you have any other suggestions?

Many thanks,

Olimpia