How to hide all the variables on RITM and task form

Joshuu
Kilo Sage

Hello All,

I need to hide all the variables on RITM and catalog task form for one specific catalog item.

Please help.

Thank you,

Priya.

21 REPLIES 21

asifnoor
Kilo Patron

Hi,

you can write onload catalog client script and select your catalog item and can add below code.

set ui type to all

 g_form.setDisplay('variable_set_name',false);
//to hide specific variable
g_form.setDisplay('variable_name',false);

Kindly mark the comment as a correct answer and helpful if it helps to solve the problem.

Hello Priya,

Did you try the code that i suggested above?

Ankush Jangle1
Kilo Guru

Hello,

 

you can use catalog ui policy to hide the field

Please refer this thread as well

https://community.servicenow.com/community?id=community_blog&sys_id=50b9aa94db0818d823f4a345ca961945

 

Mark it as correct/Helpful if it helps you

Yash Agrawal1
Tera Guru

Hello Priyarao,

Please create one Catalog UI policy that will remove your Single Variable from Ritm and Task form without any script. Please check the below screenshotfind_real_file.png

Please only check on "Applies on Catalog Task" and "Apples on Requested Item", so that the field will not be visible on RITM and TASK.

After that create UI policy Action, to make that Variable Visible False

It is working on my system,I tried.

Please Mark it helpful/correct if my answer helps in any way to resolve your query

Regards

Yash.K.Agrawal