Repeat group with auto-populate

Hello everyone,
I am trying to auto-populate the line numbers and names in the second roster of people who are 17 years of age and older, that we already collected the basic information in the first family roster. I have looked at the post in the community but couldn’t find a concrete solution. It would be great if anyonw could help me on this problem.

HH Roster.xlsx (33.1 KB)

You may have a look here, please; Pulling eligible respondents from the roster - #2 by Kal_Lam (found with the search function of this forum).

Thank you @wroos for your response. This is what I am looking for, but it is not working if the first respondent from the 1st roster does not satisfy the given condition. If you look at the attached image, 1st respondent “A” responded “No” in Q2, and 2nd respondent “B” responded “Yes” in Q2. It still displays the name of the first respondent “A”. Could you please suggest that is there any mistake in the indexed-repeat logic?
Household (Count) Repeat Example.xlsx (28.3 KB)