Skip logic condition based on date of birth (age)

Dear friends,

I have a long questionnaire. i will be collecting information about family members. one question of them is the date of birth. the number of group will be equal to the family members, so each member will have a the same group of question and will be opened automatically based on a family size previous question.
Now, i have some questions related to the family members and will be shown later in the questionnaire only of the family has like (9-16 years children) or ( woman above 13 years). this will be one question but will be reflected if any of the family member have these critieras.

So my question how can i make this condition based on date of birth so it calculate age directly?
and if this can be happened if the groups of family member are different, so old and so kids, will this be valid of any of the groups have the condition needed?

So currently what are your criteria:

  • Children (9-16 years)
  • Women (13 years+)

Is this all?

There are others my dear friend, just want to check a sample then i can do it for the rest of questions.

1 Like

Maybe you could do the same as outlined in the image as shown below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:

Image 2

Data entry screen as seen in Enketo:

Reference xlsform:

Household Repeat Example.xlsx (29.0 KB)

1 Like

I would like to amend the form shared by @Kal_Lam slightly to address the issue that the above captions tends to query i.e. you would like the question or group of questions to appear if any of the family members meet one of the criterion.

Household Repeat Example 2.xlsx (33.8 KB)

I believe what @Kal_Lam was showing was the first question should be repeated for every member who meets the age criterion 9-16 years and the second question repeated for every member who meets the gender and age criterion of female 13 years and above. If this is what you needed, there is a slight amendment that I would still propose to ensure that only names of those people are pulled.

Stephane

1 Like

Thanks you dears, i am sure that the two examples you shared are highly needed in different situations. but as @stephanealoo said, i don’t need this to be repeated to every person meet the criteria. i want a question to be opened just only if one of the children existed in the family members are between 9 to 16 years, and another question should appear if any of the members in the family are female and have more that 13 years…

The two questions that like…
1- if yo have children between 9 to 16, has any one of them has dropped out of school.?
2- if you have women more than 13 years, are any of them is pregnant?

if you please can amend the suggestion will be nice. if you don’t have time, i will try to amend your two example and will come back to you again if i have any challenge.

Thanks @Kal_Lam and @stephanealoo
Much appreciated

1 Like

Hi @mohammedrezeq
I believe with the workings in my post, you should be able to now do this for the one question that you need. The answer lies in the skip logic used in the begin group. Take your time and try it and we will help if you are stuck

Stephane

1 Like

Thank you dear both, it works finally

2 Likes

This Skip logic in name already duplication show in Two different group.
please check once.





Household_Repeat_AgeWise.xlsx (34.9 KB)