Filter out changes from My Approvals widget

Quinten1
Mega Contributor

Dear Service-Now'ers,

I'm trying to achieve to filter out Changes from the My Approvals widget used on the Service Portal. Currently Changes are also shown in the My Approvals widget, but these are managed by the CAB. Meaning all the CAB members see Changes on the service portal to approve. Since this is highly confusing we wish to no longer show those changes.

I was hoping that the My Approvals widget was using the My Approvals module to show the changes. So I configured a filter on the My Approvals widget to no longer show Approvals for that contains CHG. Unfortunately this does not reflect to the widget.

Is it possible to change this without creating a new Widget?

1 ACCEPTED SOLUTION

VigneshMC
Mega Sage

You have to clone approval widget and update the query to filter out the change approvals from showing up.

Add an filter after line 47 of server code

View solution in original post

4 REPLIES 4

VigneshMC
Mega Sage

You have to clone approval widget and update the query to filter out the change approvals from showing up.

Add an filter after line 47 of server code

Hi Vignesh,

 

Thank you for your swift reply. Would you mind showing me how the code should look like? Unfortunately my js knowledge is less than basic.

add this line after 47

gr.addQuery('source_table','!=','change_request');

Thanks

Thanks Vignesh,

Managed to do it like this.