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

Set status on change to approved when result (voting) equals approved

Highlighted
Charlie llewell
Occasional Advisor

Set status on change to approved when result (voting) equals approved

Hi All,

I would like to create a db rule that automatically sets the status of the change to approved when voting is complete and the result is approved.

It is possible to do this on a workorder using the fields:

Approval status = complete and
Result (voting) = approved

the problem is the second field is not listed as field on a change db rule even though it appears on the form.

Any ideas?

Thanks

Charlie
6 REPLIES
Ruth Porter
Honored Contributor

Re: Set status on change to approved when result (voting) equals approved

Hi Charlie,

Approval result is not available as a co ndition on a rule but you can set a custom field equal to it and then use this custom field as the condition. (This seems to be because this result field is a calculated field).

Your next challenge will then be to set the status of the owning change and you will discover that chnage is not offered in the list of fields on data update on a work order. The trick is not to use the field button on the data update, but type in the string

Change;Status

and as if by magic this should allow you to set the chnage status to approved.

Hope this helps

Ruth

http://www.teamultra.net
Charlie llewell
Occasional Advisor

Re: Set status on change to approved when result (voting) equals approved

Ruth,

Thats great thanks. How do I make the custom field get its value from the results field?

Thanks

Charlie
Ruth Porter
Honored Contributor

Re: Set status on change to approved when result (voting) equals approved

Hi charlie,

You need a DB rule on a WO, condition when Approval(status)=complete, action data update set Custom field=attribute REsult.

Then second DB rule uses this custom field as the triggering condition to set the change status

Hope this helps

Ruth
http://www.teamultra.net
Mark O'Loughlin
Honored Contributor

Re: Set status on change to approved when result (voting) equals approved

Hi here is an example on a rule we have to copy the result to another field called Approval Result Copy. We have it copying as a DB rule based on the status as below which is one way to do it.

When change is created or modified
where Status equals To be approvedORApprovedORDeclined
Shadow Approval Status (Update Data)
Approval Result Copy set to [Approval Result]
Charlie llewell
Occasional Advisor

Re: Set status on change to approved when result (voting) equals approved

Hi Thank you both,

The problem is I cannot set the value from the workorder because the approval is coming directly from the change. Is it possible to set the result field of the change to a custom field on same change which I can then use?

Thanks again,

Charlie
Mark O'Loughlin
Honored Contributor

Re: Set status on change to approved when result (voting) equals approved

Hi Charlie,

Create a Change DB rule and choose the related items field and then Workorders from the list. This will make the attributes in the workorders selectable from the Fields tab. However you cannot update the approval result directly. but you can update the status field of the related work order to approved.
//Add this to "OnDomLoad" event