How to hide variable on catalog form and request item (RITM)

Venkat97
Kilo Expert

Hello,

I have a requirement to hide one specific variable like (EmpID) on catalog form and request item RITM. But that variable should visible on sctask form

can suggest how to achieve this. 

Thanks

1 ACCEPTED SOLUTION

Gaurav Shirsat
Mega Sage

Hello 

as per the best practice of servcienow.You can use UI Policy to hide that variable.

Go the Related List of your cactalog item>open UI Policies Tab>New 

Mark  the Check Box to True for catalog item view and RITM View or your choice

Add below data as per your specification and right click on banner and save.

find_real_file.png

Now you can go related list, in catalog UI Policy action click New

find_real_file.png

 

 

or you can use onLoad Catalog Cclient Script:- Go the Related List of your catalog item> Client Script Tab>New 

find_real_file.png

 

g_form.setVisibility("emp_id",false);

Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat

View solution in original post

5 REPLIES 5

Gaurav Shirsat
Mega Sage

Hello 

as per the best practice of servcienow.You can use UI Policy to hide that variable.

Go the Related List of your cactalog item>open UI Policies Tab>New 

Mark  the Check Box to True for catalog item view and RITM View or your choice

Add below data as per your specification and right click on banner and save.

find_real_file.png

Now you can go related list, in catalog UI Policy action click New

find_real_file.png

 

 

or you can use onLoad Catalog Cclient Script:- Go the Related List of your catalog item> Client Script Tab>New 

find_real_file.png

 

g_form.setVisibility("emp_id",false);

Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat

Hello Gaurav

 

Your solution is resolve my issue. Thank you.

Hi @Venkat

If you have used client script then I will suggest to use setDisplay instead of setVisible otherwise it will left space blank whenever you hide that variable on RITM

find_real_file.png

Thank you
Prasad

Prasad Pagar
Mega Sage

Hi Venkar,

You can have 2 client scripts something like this

1. For Form and RITM

find_real_file.png

2. For task

find_real_file.png

Thank you
Prasad