How to Restrict more than one selection of household member in repeat group

Hi Family,
I have created a select one question with a repeated group to collect information on household members who are 3 years and above.
so for example,
I have a household roster with the following information:

Position Name Age
1 Jos 35
2 Merry 27
3 Samson 2
4 David 30

The options for the select one question are “Jose”, “Merry”, and “David”, and I want to restrict the enumerator from selecting any of these options more than twice.

I initially used the constraint “${worker_hhmember}=position(…)” to achieve this, but it only applied to Jose and Merry, and not David. How can I modify this constraint to cover David as well?

So how do I Modified ${worker_hhmember}=position(…) as to restrict more than one selection of eligible members in a repeat group question.
Or Is there a better way to resolve this issue?
I attached the sample Xls form for your verification.
latest_hhs.xlsx (16.9 KB)

Thank you.

@Sham_me, this post discussed previously should help you solve your issue:

Hi Kal_Lam,
Thank you very much for your support.
I was able to implement it base on the guide you shared.
However, I have seen that this method requires that until the enumerator finish going through all the repeat per each household member before the check is applied on note is applied. So I was wondering if there are 10 household members to answer the education question that has several question under the repeat, and the enumerator made a mistake by selecting a member 2 times the system does not prompt the enumerator instantly until the end of the repeat before the checks is done on them which sometimes is quite cumbersome to go back and forth again.
Is there another alternative argument to prompt the respondent immediately he/she select or attempt to select a member 2times?

Thank you.