How to hide all the variables on RITM and task form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2020 03:13 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2020 03:23 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2020 04:15 AM
Hello Priya,
Did you try the code that i suggested above?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2020 03:26 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2020 03:38 AM
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 screenshot
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