Did you wish to make Person;Searchcode unique without messing around with the DB indexes?
I know there is a "workaround" to run sd_dataform listing all persons with same searchcode but this cannot enforce uniqueness of searchcode, is merely a warning.
Well, it is doable :)
I don't recall if there is a custom person field in persons. If yes you can use that, if not, you need SP19 or higher to create a custom person field.
It takes two UI rules. First enable the custom person field and name it whatever, (eg: temp_person).
When searchcode is anything set temp_person;searchcode to searchcode.
Now the tricky part.
Before saving the rule, open the update data panel and select the entry you entered previously. Select with the mouse the ";searchcode" part and press delete. You will notice that "Value" is cleared. Don't worry, just press CANCEL.
The interesting part that if you followed the steps exactly the rule is now:
When a value has changed where Searchcode (*) is anything AND LDAP_DN is empty SET REPORTS;TO SEARCHCODE (Update Data) temp_person set to [Searchcode]
Cool huh? The good thing is that if searchcode matches an existing person then the custom field temp_person will be filled! If not, it will remain empty.
Now the second rule is very simple. Before item is saved where temp_person is not empty present a message of ERROR type (so the user cannot cancel and save the record).
George, and what will happen if there are already two persons in SD with the same searchcode and you try to add the third one again with the same searchcode? Will temp_person be filled with first found value? or it will stay empty or generate some error?