How to use xpath for validating duplites

In my case , i have teacher entity with teacher id attribute ,while getting the id value the values should be unique what is the possible xpath constraint
1 answers

Hi Meekas, if you want the check your new ID for uniqueness. You can retrieve the first object [yourID = $newobject/yourID] and check (use a decision) if the object is found. If so you need to change the ID, if not the ID is unique. Hope this helps!