Hi @Manne_Munikumar,
In ODK Collect each submission is independent, so unfortunately I don't think it is (currently) possible to perform your desired feature.
You could try to use a workaround though, e.g. use a repeat group and check whether there are duplicates in the entries selected in a certain variable.
See similar discussion here: See: Need assistance to create an incrementing ID field - #2 by Andrea_Martin
I hope this helps!
Best,
Andrea