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

Datacopy from SC->CMDB via UI rule

SOLVED
Go to solution
Highlighted
Jan Gunnar Helg
Senior Member

Datacopy from SC->CMDB via UI rule

Hi

Im setting up a new feature to ease casehandling for our local support guys:

On the service call I have added a button "Update CI"

An UI rule trigges when its activated that copy the following fields:

SC Caller -> CI Owner
SC Cost area -> CI Cost area

I also want to set SC Location -> CI Location but it will not let me choose this field in the UI rule setup

Is there anyway to circumvent this?
Also is there maybe a better way to do this alltogether?
8 REPLIES
George M. Meneg
Honored Contributor

Re: Datacopy from SC->CMDB via UI rule

SC Caller to CI owner can be done since both entities are person.

SC Cost Area -> CI Cost area can be done directly if this is text field or number. But if this is code, it's much trickier. The best way to circumvent this is by *TYPING* instead of selecting.

Select a text field on CIs (for example CI Searchcode) and set it to value of SC Cost Area. Don't press "Add", instead hilight the "CI;Searchcode" and there *TYPE* Configuration Item;CI Cost area

About location: Service Calls don't have a location field but if you manage to add it as a custom entity reference field, then this should be available using standard field selection. If not, try again the typing trick.
menes fhtagn
Jan Gunnar Helg
Senior Member

Re: Datacopy from SC->CMDB via UI rule

Trying your trick, sadly it wont let me, it just autoblanks out the value if I write in the field I need manually.

I guess they "fixed" this in a servicepack, I am running SP21
George M. Meneg
Honored Contributor

Re: Datacopy from SC->CMDB via UI rule

It still works with a minor change.

From the list select Configuration Item;CI Cost area and when this is selected type just after ;Text

You will notice that value button is active. From there select SC Cost area and then press "Add to list". Press OK to add the update data but do not press next. Instead select the update data action. There double click the action to edit. Select ;TEXT and press delete. Then Press Cancel

The update data now should be
CI Cost area set to SC Cost area
menes fhtagn
George M. Meneg
Honored Contributor
Solution

Re: Datacopy from SC->CMDB via UI rule

There is also another solution. Instead of having two codes "CI Cost Area" and "SC Cost Area" create a new custom code and name it "Cost Area". Create a custom entity reference to it from both Service Calls and Configuration items and you can copy values from one to another without the need to resort to tricks like that.

And since you create a new custom entity reference field you can have different names. For service call SC Cost Area and for CIs CI Cost area. Since both will point to same entity update data will work without problems and without need of tricks.
menes fhtagn
Jan Gunnar Helg
Senior Member

Re: Datacopy from SC->CMDB via UI rule

Ah yes, thats a much better way of doing it. Thanks for the tip George :)
Jan Gunnar Helg
Senior Member

Re: Datacopy from SC->CMDB via UI rule

I still would like for the UI rule trick to work, but it just wont let me. Check the attachment. What am I doing wrong?
George M. Meneg
Honored Contributor

Re: Datacopy from SC->CMDB via UI rule

For Location use "Searchcode" instead of "Text".

Make sure that the ;Text part of Service Call;Location Code is the same with Location Searchcode.

Also, this won't work if you you have more than one locations with the same searchcode.
menes fhtagn
Jan Gunnar Helg
Senior Member

Re: Datacopy from SC->CMDB via UI rule

Aha now I get it, it must be an existing subfield of the one you are trying to use and it has to be a text only one. Thanks
//Add this to "OnDomLoad" event