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

Location field setting

SOLVED
Go to solution
Highlighted
Gail D
Collector

Location field setting

I am on SD 4.5 SP17. My customers location field tree is Building/room/cubicle-No. Right now the location field on a CI form only shows the Cubicle-No.

Is there a way to show the tree view "Building/room/cubicle-No" in the Location field?
7 REPLIES
George M. Meneg
Honored Contributor
Solution

Re: Location field setting

Hello,

The bad news is that to my knowledge you can't do that.

The good news is that using a ui rule you could do it. Use a custom field (since you are on SP17 you can't create an 80 chars field), so use a 255 character field.

Anyway create a ui rule when a configuration item is opened and location is not empty
as action update data construct an update function like the following:

SET LOCATION LABEL (Update Data) Location_Label set to @@GRAND_PARENT@@/@@PARENT@@/@@CHILD@@; Location_Label set to (Substitute for (Substitute for (Substitute for [Location_Label] String @@CHILD@@ With [Location]) String @@PARENT@@ With [Location Parent Location]) String @@GRAND_PARENT@@ With [Location Parent Location Parent Location])

menes fhtagn
Gail D
Collector

Re: Location field setting

George,

I hadn't thought of that.

Thanks,
Gail
Michael Daly_2
Collector

Re: Location field setting

Hi Gail

George is definitly a wizard when it comes to these solutions, but I couldn't quite make that work, but it gave me some ideas.

I created a new custom text(255 chars) field for Config Items called 'Location ID'. I then used a UI rule with the same conditions (please see attached SD_CI_Rule1.rtf file zipped down to SD_CI_Rule1.zip). Instead of the 'substitute' function I used the 'concatenate' function, and it worked a treat. I even threw in a few '->' characters to separate the GrandParent -> Parent -> Child fields of data.

Good luck with it and thanks George for your help and wisdom. ...Michael
Michael Daly_2
Collector

Re: Location field setting

Hi Gail

I made one slight error in my rule conditions. I have added that my new field 'Location_ID' is empty else it keeps concatenating Location data every time you open a CI.

...Michael
George M. Meneg
Honored Contributor

Re: Location field setting

Hello,

The "substitute for" is going to work only if location have three levels and this is because of the bug of implementation in "substitute for". If the target is null it clears the field.

Using concatenate is more complex but it's safer.
menes fhtagn
Gail D
Collector

Re: Location field setting

Thank you both for the great input.

Gail
Vareliy
Acclaimed Contributor

Re: Location field setting

Hi, Michael !

"The "substitute for" is going to work only if location have three levels and this is because of the bug of implementation in "substitute for". If the target is null it clears the field."

How to present more than three levels through the 'concatenate' function ?
//Add this to "OnDomLoad" event