Notifications

7 views

Description

When you have an use case where approver should be able to see the current stage of the request before he/she approves the request. 

Resolution

Approval Summarizer holds the details of the item being approved, where variables get displayed under  the "Description" column. So, one way to display current stage of the request is to

1) Create a new variable to store RITM's current stage [This variable can be hidden from the end user using UI policy or Catalog Client Script]

2) Then create an after update business rule on 'sc_req_item' table with Condition set to 'Stage changes' and add below given script in the Advanced tab

** NOTE: You can also add specific Item to the Condition, but if this variable is not found in that item below script won't do anything.

(function executeRule(current, previous /*null when async*/) {

current.variables.item_stage = current.stage.getDisplayValue(); // where 'item_stage' is the variable used to store RITM's current stage
current.update();

})(current, previous);

Above script takes care of updating the variable 'item_stage' every time RITM stage changes. 

3. Variable 'item_stage' will then be displayed in the Approval Summarizer under "Description" column

Additional Information

https://community.servicenow.com/community?id=community_question&sys_id=9f9e5be1db00545cd58ea345ca9619be

Article Information

Last Updated:2020-04-17 18:07:27
Published:2020-04-18