How to Create and Show/Hide Annotations in a Form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
β04-09-2025 11:48 PM
ππ¨π° ππ¨ ππ«ππππ ππ§π ππ‘π¨π°/ππ’ππ ππ§π§π¨ππππ’π¨π§π¬ π’π§ π π
π¨π«π¦
Annotations are essential in ServiceNow forms as they enhance user experience, reduce errors, and provide additional support, making processes more intuitive and efficient.
How to create an Annotation
Open the 'Personalize Form Layout' page in the form > Locate the field type '*Annotation' > Select it for the form view.
Annotation Details:
Form Annotation Type β> table 'sys_ui_annotation_type' β where you can define the <style> for your HTML annotation text:
To add the content to the text, we will create a Message in the 'sys_ui_message' table in HTML format:
After selecting the Style and creating the Message, we can now create the Annotation:
View the Annotation in the Form:
How to show/hide an annotation through a Client Script
I added a new variable for the demonstration. If the 'Select to hide' checkbox is selected, I want the annotation to be hidden.
To do this, we need to reconfigure the annotation:
Open the 'Personalize Form Layout' page in the form > Locate the previously created annotation.
Add an id attribute as a unique identifier for the text so we can reference it in the client script:
New Client Script:
Note: The 'Isolate script' field must be set to false, i.e., not selected.
View of the result in the form:
- 801 Views