Survey won't submit , after applying a method to restrict duplicate choices in a repeated group

hello, this is my first post here and i'm stuck at my final step in my form building

i have made a select one question that is imported from a CSV file which contains names i want a method that restrict the enumerator to select the name again from the list in the repeated group ,so far it works but when i submit the survey it brings me back to the second repeated group and tells me that the answer is invalid, i can't see where i have gone wrong can you please take a look
the calculations for the subject start at row 92 and highlighted in green

Hi @Abood_Jayyousi
We're glad you're here. When you get a chance, please introduce yourself on this forum thread. I'd also encourage you to add a real picture as your avatar because it helps build community!

could you attach your form? It's not possible to help you based just on your description.

@Grzesiek2010 Hello sorry i had to remove my survey after i found out it had sensitive data but i also solved my issue
and this is the solution
i followed the instruction in this example

thus the survey wouldn't submit i had to add once() infront of this statement
once(if (${C2} = 1, '~', substr(${C1}, 0, string-length(${C1}) - string-length(${serial_un_N_index}))))
sorry i can only upload one media file since I'm new

Ok that's great you were able to solve it on your own!