…thoughts on ServiceNow and digital transformation

Post

ServiceNow Dynamic Annotations – Using Javascript in Annotations


I have an html annotation in a form with a link that gets updated yearly. I was looking for a way to dynamically generate the link so that I wouldn’t have to remember (i.e. to be reminded) to update it on Jan 2nd and found this question in the community https://www.servicenow.com/community/now-platform-forum/dynamic-url-in-annotation-on-a-form/m-p/1263468

In this question, howard8 shows how you can use the below syntax to add data from a field in the table

${current.number}

In poking around at the documentation, there is a mention of the below syntax for adding dynamic text

 ${gs.getMessage("Message key text")}

I found that you can put any javascript in the curly braces

${new myScriptInclude().getSomeDynamicInfo()}