- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2022 09:56 AM
Hi everyone!
We've been doing a lot of changes in our Service Portal and one of these is to display the approver name of the RITM so that users without ITIL role can see who's the approver of their RITM.
This can be found on sp_instance_table. I tried looking if there's an APPROVER field for this configuration but I don't see one. Is it possible to add the name of Approver for this enhancement?
Solved! Go to Solution.
- Labels:
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2022 11:09 PM
Hi
Sure will try to assist you here.
First thing to understand why you are not able to directly select Approver Name in instance option is because Approvals resides in a Different table named as "sysapproval_approver".
So in order to Include Approver name as well, you need to follow below steps:
1) Create a List Type field on Requested Item record and refer it to User Table as shown below:
Now write a Business Rule on Approval Table that when ever a approval record is generated for an Requested Item then the field which we have created above will be updated with Name of Approver as show below:
BR Details:
Table Name: sysapproval_approver
When: After Insert
Condition of BR: Approval For-->Task-->Task Type is sc_req_item
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id',current.sysapproval);
gr.query();
if(gr.next()){
gr.u_approver_name = gr.u_approver_name + ',' + current.approver.toString();
gr.update();
}
})(current, previous);
Now the widget which you have shown is a Simple List widget where I believe you have configured your Widget instance Option to display RITM columns.
Now you need to go to the same instance record as you have mention in your screenshot above and add the field named as "Approver Name" which will show you the Approver Name in your portal view as needed.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2022 10:08 AM
Hello,
The fields which you see are the fields on the RITM table.
So, one thing you can do is create a custom approver field on RITM table and write a BR to fill the approver field with the approver name.
Then you can use that field on the Portal.
Please mark answer correct/helpful based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2022 10:12 AM
Hi Saurav, I appreciate your response. I am new to ServiceNow I am not familiar with the configuration for this. Can you teach me the step by step process on how I can do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2022 10:16 AM
Sure just one question before this is your approval set from workflow?
And can one RITM have multiple approvals?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2022 05:29 AM
Hi Saurav, upon checking, some catalog items are using WORKFLOW and some are using FLOW DESIGNER. And yes, some RITM's have MULTIPLE approvals, some are just single approval.
If Single approval, only the manager of the user who submitted the ticket will approve the RITM.
If MULTIPLE Approval, the 1st approver is the manager of the user who submitted the ticket. Once the manager approved the ticket, 2nd approval is a GROUP APPROVAL. Only one approval is required for the GROUP approval. Anyone can approve the ticket as long as they are member of the group.