Service Desk Practitioners Forum
cancel

Setting Closure code automatically - SD 4.5 SP21

SOLVED
Go to solution
Highlighted
Michael Gregor
Outstanding Contributor.

Setting Closure code automatically - SD 4.5 SP21

We wish to set the field Closure code automatically based upon the last Closure code the current user chose when he closed his previous SC.

I have tried to implement this by adding a custom field "Last Closure code" to Person, with entity reference to SC. "Last Closure code" is text 255.

I have an UI-rule that basically sets "Last Closure code" = Closure code upon saving SC.

Next, I am trying to make a new rule to bring back this value by setting Closure code = Person's (current user's) "Last Closure code" field when SC Status has changed to Closed, however I am not able to set Closure code to anything other than Subcontract call/closure code.

Any suggestions how this could be done would be very welcome.

The reason why we are trying to achieve this is that we have many closure codes, but the operators usually choose the same one depending to their organizational function. First line operators usually choose "Closed by first line involvement" etc. We wish to make it easier for the operators by pre-filling the field with the value they used the last time.

Michael
7 REPLIES
Mark O'Loughlin
Acclaimed Contributor.

Re: Setting Closure code automatically - SD 4.5 SP21

Hi Michael,

from a process point of view will the last closure code always be the same as the closure code for the current call. if not any you run analysis based on closure code you may not actually get a true picture of the closure code trends.

Use one UI rule to set the value from the Person record to another code field. You may need an individual rule for each closure code. Then fire the rule to match the copied over code to the closure code.

Maybe you could do this with less rules using generic realtionships?
Michael Gregor
Outstanding Contributor.

Re: Setting Closure code automatically - SD 4.5 SP21

Hi Mark.

Not sure how this could be done using generic relationships.

About copying the code back to the Closure code field: that's the problem, I cannot find the field to copy from! Only field available to copy to Service call/Closure code is Subcontract call/closure code.

Michael
George M. Meneg
Acclaimed Contributor.
Solution

Re: Setting Closure code automatically - SD 4.5 SP21

Hello Michael,

Do the following:

Create a db rule that when closure code is anything to store closure code;OID to a person field.

Then create a service call ui rule that will be triggered when the status is closed. As actions select update data and there *TYPE*
Closure code;text and once the button on the left of the value becomes active, set it to the custom person field. Press add to list and then ok. But then DO NOT press "Next>", just select the action and press "Modify..."
Select the update action and hilight the ";text" part and press delete. Then press Cancel.

You will see that the action becomes:

Closure code set to [THE NAME OF THE CUSTOM PERSON FIELD].
menes fhtagn
George M. Meneg
Acclaimed Contributor.

Re: Setting Closure code automatically - SD 4.5 SP21

Sorry, pressed submit too fast.

Doing that literally instructs service desk to set the Closure Code to the last calls Closure Code (the OID that is stored in the text field is for all the query builder knows, the same with Closure Code).
menes fhtagn
Michael Gregor
Outstanding Contributor.

Re: Setting Closure code automatically - SD 4.5 SP21

George, it works!! It's magic! No wonder you'r a Pharao :-)

Didn't know it could be done like this.
But now I'm puzzled though, how does it work? Could you care to explain?

* what is the OID?
* must I use DB-rule to save the OID and why not UI?
* what happens when I type "Closure code;text"? Why is suddenly the saved value from Person available?
* why does ";text" disappear just by deleting it and clicking cancel?

Hmmmm.. strange things...

Thanks!

Michael
George M. Meneg
Acclaimed Contributor.

Re: Setting Closure code automatically - SD 4.5 SP21

Hello Michael,

* what is the OID?

OID means "Object ID". Every entity has an OID and it is unique since it is the primary key on the table that the entity is stored. So, by setting Closure Code = OID literally you set closure code to the value that has as OID the OID you entered.

* must I use DB-rule to save the OID and why not UI?
No, you can do it in a UI rule.

* what happens when I type "Closure code;text"? Why is suddenly the saved value from Person available?

A code like "Closure code" though appeared as attribute, in reality it is an entity. Every entity has attributes and "text" is one attribute of them (at least for Code fields, hierarchical or not). Since Closure Code;Text is text field you can use function available to text field or set to a value of another text field, like the custom text field on persons.

* why does ";text" disappear just by deleting it and clicking cancel?

Actually this is a bug found by Oguz Kutlu Asik. He posted about it at http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=787798
menes fhtagn
Michael Gregor
Outstanding Contributor.

Re: Setting Closure code automatically - SD 4.5 SP21

Thanks again George.

Very useful info.