How to add condition to specific loop in repeat group?

Scenario:
I have a repeat group that asks basic information such as name, age and occupation. The number of times the group repeats is based on the number of HH members interviewer entered. Irrespective of the number, the loop’s first entry has to be of household head.

Question:
I would like to know that if there is anyway I can apply conditions on certain questions within the repeat group that does not apply to every loop and just for that one particular repeat ?

For eg: I want first loop to be for the household head and I need to make sure that the age is not less than 18. However, as the first loop is over and another repeat loop opens for the new HH member, the age condition, applied specifically for the first loop, should not apply to this loop unless I program it.

Furthermore, If I want to implement condition on first and third loops out of 5 or first 3 loops and not on last 2 situations. How can I implement it ?

You will have to get the current position(…) and use if statements in the calculate column

1 Like

@apulikkal, as advised by @morriz, you could do the same as outlined in our previous post:

… and this too …