How to hide variables section or incident variable editor on the incident form?

dharanikumar
Giga Guru

Hi All,

I want to hide the Variables section / Incident Variable Editor on the incident form.

Steps to re-produce in our OOB instances:

1. User Self Service -> Click on Service Catalog.

2. Search for Create Incident and open it. Fill the required fields and submit the record.

3. Incident will be created and would be shown in self-service view. Change the view to default view. Then we can see the variables available in variables section / Incident variable editor. Please refer to the below screenshot.

find_real_file.png

Tried Steps:

1. Created a Catalog UI Policy and set this to target record level. It is hiding the variables but the section will available on the form. Something it is like empty variables section.

2. Created Catalog Client Script on the and set this target record level. The same is happening here it will hide the variables but the section will be available.

3. I thought if we the hide all the related variables which are available in the variables section / Incident Variable Editor. Then the variables section will be auto hided.

4. For some reasons the section will available there. Please check the below screenshot.

find_real_file.png

Please suggest me how to achieve this. 

-Dharani

14 REPLIES 14

That wont help i guess, solution on that thread was to create a new form view altogether without variable editor.

-Anurag

that's the only alternate i think can be applicable here.

 

Yea, otherwise DOM manipulation that i had suggested 😞

 

But i feel there should be a better way of doing it.

-Anurag

You have to use this code

document.getElementById("element.ni.VE1ec3c6484f23320099f1b3728110c7c8").style.display = "none";

but the element if you need to capture form your instance by hovering over the variable editor

find_real_file.png

 

Please mark my answer correct/helpful if it helped you solve your issue.

-Anurag

 

-Anurag

do you really think its a good approach ?