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.

unwanted varibale in ritm and sctask

nameisnani
Mega Sage

Hi Team , 

 

We have a catalog called ' XYZ '

 

Request is submitted  , 

 

As u can see in the below screenshot i haven't selected ' role name' variable .

 

nameisnani_0-1707369951715.png

 

 

But in the ritm and in SCtask this variable is showing , which is wrong .

 

we don't want to show this field , in ritm form and as well as in sctask .

 

nameisnani_1-1707370057839.png

nameisnani_2-1707370094659.png

 

How to fix this ? can anyone please help me here ,

 

Please provide screenshot for better understanding .

 

Thanks in Advance 

 

 

3 REPLIES 3

Danish Bhairag2
Tera Sage

Hi @nameisnani ,

 

U need to create a onLoad client script n make sure u only select the check boxes for Applies to RITM & Applies to Task n uncheck applies on catalog item which will be by default check.

 

Then under UI policy action add that field n make it mandatory false n visible false.

 

Thanks,

Danish

 

Sohail Khilji
Kilo Patron

@nameisnani,

 

1. Navigate to Catalog item > Open the required catalog item 'xyz'

2. From realted list create a onload catalog client script

3. uncheck the check box applies to RITM, CATALOG TASK AND REQUEST and add conditions according to your business need.

4. save the record, Create a catalog UI policy action and set field to visible false, (Make sure its not mandatory on variables level)

 

I hope this helps...

2024.jpg

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Harish KM
Kilo Patron
Kilo Patron

Hi @nameisnani I think your hiding variables using UI policy on catalog form , ensure the below boxes are checked as well so that they dont appear on RITM,Task

HarishKM_0-1707371959200.png

 

Regards
Harish