Compare entries using indexed-repeat

Hello people!
I have the following problem: I want to compare the gender of the first individual and the other remains that are in the begin_repeat I tried indexed-repeat () but it is not working.
I want that when sex is the same to generate the error, and when they are different accepted, but showing the error for both cases
not (indexed-repeat ($ {sexe}, $ {Repeat}, 1) = $ {sexe})

Hi @Edmy_Penhor
welcome to the forum! Please introduce yourself here!

Could you attach your form or provide a sample step by step?

Hi @Edmy_Penhor,

Welcome to the forum.

Does something like this work for you? repeat_check.xlsx (14.6 KB)