The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Service Desk Organization Search Code

Highlighted
Veronica_13
Super Collector

Service Desk Organization Search Code

The Help in Service Desk mentioned that an organization search code need not be unique.
However, my company would like to make it a unique code, how can I enforce the organization search code to be unique?


8 REPLIES
Robert S. Falko
Honored Contributor

Re: Service Desk Organization Search Code

Veronica,

You will need to create an external program or script that receives the name and a unique identifer, triggered by a rule. This program will check for uniqueness and return a message if it is not unique. You might also need to create a VB script that changes the value on screen (deletes it?), in order to force (suggest?) a value. Note that the Web API does not know how to update values on screen in the client. It only knows how to update the database.

-Josh
Vasily Kamenev
Honored Contributor

Re: Service Desk Organization Search Code

Hi Veronica
Josiah not absolutely correct, update possible in opening form if you a will using Action "Update data from External System". That base on cgi or servlet system and if on your servlet or cgi script insert checking on unique so that possible. Checking possible as by web-api so and by directly by SQL, SQL will work more quickly.

Vassili
Veronica_13
Super Collector

Re: Service Desk Organization Search Code

thanks for all your responses.
I was looking for something that's already provided within Service desk.
Robert S. Falko
Honored Contributor

Re: Service Desk Organization Search Code

Veronica,

There is no out of the box solution to enforce uniqueness. You can, however, use an overview action or run sd_dataform in order to display any existing records that already use that Search code. But it is just a display.

-Josh
Ken Briscoe
Honored Contributor

Re: Service Desk Organization Search Code

There is a another simple but messy way. Just go into the database and put a unique constraint on the Search Code field in the table. If anyone tries to create a duplicate they will get a big ADO error message (so you have to tell people to expect that). And of course, becuase you are changing the database, HP won't support it. I said it was messy!!!! (But it works).
My email is kenilian@bigpond.com.au
Victor Helsinki
Super Collector

Re: Service Desk Organization Search Code

In Service Desk 5, you can identify some custom fields as required to be unique, so my solution for such an issue was to copy search code of the organization to a custom field already in the form but not visible(didn't give rights for that) and give that field the property of being unique. Works fine but be aware of creating the proper custom field should be difficult.

Regards

Vic.
Veronica_13
Super Collector

Re: Service Desk Organization Search Code

I have decided to take the database approach as suggested by Ken Briscoe. As the organisation record is created by a couple of people, so it's not too hard to inform the users of the potential error message they will receive if a duplicate search code is entered.
thanks again for all your rsponses.
Ken Briscoe
Honored Contributor

Re: Service Desk Organization Search Code

Victor - that's a nice solution. Might try that in our V5 installation for Person Search Codes.
BTW, Veronica - don't forget some points for all the respondents please!!!
My email is kenilian@bigpond.com.au
//Add this to "OnDomLoad" event