How to Filter only sc_req_items in the Approval widget on the ServicePortal

Peter Williams
Kilo Sage

Good day everyone,

i am looking for how i can only display sc_req_items in the Approvals widget for the ServicePortal view.

I want to not display the CHG or any other approvals but just the RITM ones.

Tried to clone the widget and modify the code but nothing seem to work

 

any help will be great.

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Peter Williams 

but why?

The approval widget is a central place to show all the approvals for the person who logged in.

What if the person has CHG approval then it would be very difficult for that person to check the approvals?

this link has the solution, please enhance

Restrict approval widget to show only RITMs/CRs approval on Service Portal 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

11 REPLIES 11

J Siva
Tera Sage

Hi @Peter Williams 

You need to make changes in the client script, server script and header menu item script.
PFB.
1. Clone the "Approvals" widget

2. Edit server script of the widget by adding the below highlighted line.

JSiva_0-1744525165408.png

3. Edit the client script.

JSiva_1-1744525271935.png

4. Edit the header meny item script.

JSiva_2-1744525339265.png

Output:

JSiva_3-1744525529603.png

JSiva_4-1744525609558.png

 

Hope this helps.
Siva

This is amazing i will try it out and let you know 

Sure 👍

ok so i was able to get all the steps done, it half worked.

 

the menu when you like on the Approvals shows just the RITM but when you click on View All approvals the CHG is still appearing

 

PeterWilliams_0-1744651434290.png