How to hide Annotation Line on Form load.

Priya Gautum
Kilo Guru

Hi All,

I wanted to hide the Annotation(Line separator) for some specific condition.

I have written the below code in UI policy, but still getting the Line:

In Execute if true:

function onCondition() {

	my_annotation.style.display = 'block';
}

The outcome is:(Please refer to the yellow highlighted line)

find_real_file.png

Not sure how we can hide the Line.

Regards,

Priya

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Priya Gautum 

I was able to hide the form annotation which is present for field using this

gel('my_caller_annotation').style.display = 'none'; // give the html id of your div tag

Ensure your client script has Isolate Script field set as false to allow DOM to work

find_real_file.png

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Priya Gautum 

Is it form annotation or UI formatter added as 1st element on the form

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@Priya Gautum 

I was able to hide the form annotation which is present for field using this

gel('my_caller_annotation').style.display = 'none'; // give the html id of your div tag

Ensure your client script has Isolate Script field set as false to allow DOM to work

find_real_file.png

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

I am not getting an option for "Header Text".

find_real_file.png

Regards,

Priya

 

Hi,

on which form you are doing this

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader