Use value from repeated group in skip

Dear all,

We have a children listing in our questionnaire, where we first ask for the number of children (3-18 years) in the household, followed by a repeated group to gather a number of basic information per child. There is no upper limit to the number of children.
So far so good.
After the listing, there is a battery of set questions on the state of primary school education, and a battery on the state of secondary school education. The first should be shown once if there was at least one child in primary school; the second should be shown once, only of there was at least one child in secondary school.

In other words, we are trying to use a value from within the repeated group in a skip condition outside of that group.

Any help is much appreciated!

Correct me if i have understood you correctly:

  • Q1. A integer question that captures the total number of children (3-18 years).
  • Based on the number you have in Q1, create a repeat group question with certain questions that can capture whether the children is from primary school or from secondary school. Then close the repeat group question.
  • A group of questions related to primary school should only be activated if there are children in the repeat group question.
  • Similarly a group of questions related to secondary school should only be activated if there are children in the repeat group question.

So basically you are trying to skip a group of questions if there are no students matching either primary school or secondary school. Did i get you correctly? If no, please correct me.

Could you also list down some sample questions so that we could help you out if it’s something you are seeking as outlined above.

Dear Kal,

Again many thanks for your quick reponses. What you describe is exactly what we are trying to achieve. To illustrate the desired functionality, see here a link to a mock-up questoinnaire. Below attached the corresponding .xlsx form.


adGKgU9XmH8JPx9SCJoTnb.xlsx (11.0 KB)

Hi Johannes,

The best way to do this in a clean way is to create a calculation inside the repeat group. Something like the below script, with a similar calculation for secondary school. if(${Does_child_currently_or_secondary_school} = ‘yes__primary_school’,1,0)

Then outside of the repeat group you will have another two calculations which sum the value calculated inside the group.

The relevancy on the primary school questions can then be based on this calculation outside of the repeat group having a value greater than zero.

If it doesn’t work for you straight away or there are other areas of assistance you need with this form just let us know as for Covid related data collection, its possible to provide some free services such as building this functionality into the form for you or running a check on the form being created to ensure that it includes all the best design practices for easy data analysis later.

Best regards,


1 Like

Hi @vonengelhardt,

As outlined by @NoelCartONG, you could do it as shown in the image below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:

Image 2

Data entry screen as seen in Enketo: Condition not met

Data entry screen as seen in Enketo: Condition met

Reference xlsform:

Group Skip.xlsx (11.7 KB)

1 Like

Hi Noel/Kal,

This is indeed quite an elegant solution - and works like a charm.

Many thanks to you both!

1 Like