Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Hide Annotations based on UI policy

DevYadav
Tera Contributor

Hi Community, Good Day,

 

I am stuck in a requirement, the requirement to hide Annotation using UI policy when state is in progress then annotation should not visible. I am using this solution. 

 

image_2025-12-01_163834954.pngimage.png

DevYadav_1-1764589188052.pngDevYadav_2-1764589320414.png

 

 

Thanks

 

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@DevYadav 

I could see you added annotation in form section

you can show/hide form section in your UI policy "Execute if true" and "Execute if false" script

Give correct section name -> space replaced with underscore

// Hide the section
g_form.setSectionDisplay('test_for_annotation', false);

// show the section
g_form.setSectionDisplay('test_for_annotation', false);

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Ankur Bawiskar
Tera Patron
Tera Patron

@DevYadav 

Would you mind closing your earlier questions by marking appropriate response as correct?

Members have invested their time and efforts in helping you.

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