Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

unique search code

SOLVED
Go to solution
Highlighted
Eric Ung
Frequent Visitor

unique search code

Guys,
Is there a way to turn on unique search code for Person in OVSD4.5 SP22?
3 REPLIES
Alain_18
Regular Collector
Solution

Re: unique search code

Ken Briscoe
Honored Contributor

Re: unique search code

The other way is get your DBA to put a Unique constraint on the Search Code field in the DB table for person. (I know that's not supported by HP though !!!).

You get a not very friendly java/SQL error when you then try to add a record with a duplicate search code. So rough and ready solution but it does work, and it's OK if only a few people are creating person records and you can tell them what the error mean.

Yet another alternative involves using External Data routine with some API code which you call via UI Rule when Search Code is entered. This routine would count the number of occurrences in the DB of that Search Code, and return the count to a field. Another UI rule tests that field and if >0 you have a duplicate and can pop up an error message and clear the search code. This is more sophisticated and user friendly but a lot more effort. (Can't give you code for this as it's client IP, sorry).
My email is kenilian@bigpond.com.au
Eric Ung
Frequent Visitor

Re: unique search code

Brilliant. Thank guys.
//Add this to "OnDomLoad" event