Show/Hide Annotation in Native Form UI without DOM Manipulation

DebjitGhosh31
Tera Contributor

Hi All,

 

I have an annotation (info blue) in place in the change form which I want to make visible when a specific field is selected and hide in any other scenario. 

As it is not recommended by ServiceNow, I do not want to use DOM manipulation to achieve this. Is there any other alternative way to do this??

 

Any other field type to achieve similar info blue message in the form view will also work, but unable to find any field type which will do a similar job.

DebjitGhosh31_1-1708925478524.png

 

Regards,

Debjit

4 REPLIES 4

Community Alums
Not applicable

Hi Sandeep,

 

Thanks for the response.

The issue with the solution you provided is that the script is using DOM manipulation which I cannot use, that is why, I am looking for an alternative.

 

Regards,

Debjit

Shailesh Kumar1
Tera Contributor

Hi @DebjitGhosh31 

Instead of an annotation you can give a field info message using client script on a particular condition as per your requirement...

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,

Hi Shailesh,

Thanks for the response.

Issue with using field info message is that these annotations work as a section header in the form, so I am unsure how to achieve the exact same output.

 

Regards, 

Debjit