Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Grey out "No longer Required" option from the Approval drop down "Action on selected rows"

Community Alums
Not applicable

Hi,

I have a requirement to grey out/hide "No longer Required" option from the Approval drop down from "Action on selected rows" and this should be hidden only to tickets generated from a particular catalog item. How can I achieve this? Any suggestions would be greatly appreciated. Here is the screenshot of the requirement. I have to hide "No longer Required" option which is highlighted in yellow for tickets generated from a particular catalog item. Please guide me.

 

saran20_0-1700127807733.png

 

Thanks,

Saran.

 

15 REPLIES 15

Hi @Community Alums ,

Then i would suggest you need to make the changes on the button that is on table "sysapproval_approver"

 

with the condition if you want to hide for one particular catalog item: 

current.sysapproval.ref_sc_req_item.cat_item == '<your_catalog_item_sys_id>'

 

It will resolve that thing.

 

 

 

Thanks,

Abhishek

Community Alums
Not applicable

Hi @Abhi13 

 

If I use the not equal to in the below condition, the 'No longer required' button is still visible for all catalog items.

ApprovalListChoiceCondition() && current.sysapproval.ref_sc_req_item.cat_item != '2831b98ea11a5180cdd7ea38bc3b7e90' 

 

If I use the below equal to in below condition, 'No longer required' button is not visible to all catalog items.

ApprovalListChoiceCondition() && current.sysapproval.ref_sc_req_item.cat_item == '2831b98ea11a5180cdd7ea38bc3b7e90' 

 

It is weird! It is working the opposite and moreover the change is applied to all catalog items.

But my requirement is to hide for a specific catalog item. Any suggestions please.

Here is the screenshot for your reference.

saran20_0-1701151302898.png

Thanks,

Saran.

 

Community Alums
Not applicable

Hi @Abhi13 

I have used your above condition in the UI action but this change is applied to all catalog items but I want to hide it only for a specific catalog item. Could you please help me out? Here is the screenshot for your reference.

saran20_0-1701068196695.png

 

Community Alums
Not applicable

Hi @Abhi13 

If I use the not equal to in the below condition, the 'No longer required' button is still visible for all catalog items.

ApprovalListChoiceCondition() && current.sysapproval.ref_sc_req_item.cat_item != '2831b98ea11a5180cdd7ea38bc3b7e90' 

 

If I use the below equal to in below condition, 'No longer required' button is not visible to all catalog items.

ApprovalListChoiceCondition() && current.sysapproval.ref_sc_req_item.cat_item == '2831b98ea11a5180cdd7ea38bc3b7e90' 

 

It is weird! It is working the opposite and moreover the change is applied to all catalog items.

But my requirement is to hide for a specific catalog item. Any suggestions please.

Here is the screenshot for your reference.

saran20_0-1701151302898.png

Thanks,

Saran.

 

Community Alums
Not applicable

Hi @Abhi13 

Any suggestions on the above query?

 

Thanks,

Saran.