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.

How to get RITM variables in Notifications

Omkarbh1997
Tera Expert

Hi,

I have created a one notification on 'Catalog Task' table, but I have to show catalog item variables in that notification.

Please suggest how I can show the variables.

 

Thank You.

1 REPLY 1

Paul Curwen
Giga Sage

There is a really good easy to follow blog on this here:

 

https://www.servicenow.com/community/developer-articles/no-code-date-validations-through-catalog-ui-...

 

In your Mail Script you can use the syntax current.variables.variablename;

 

You may want the DisplayValue in which case use: current.variables.variablename.getDisplayValue();

 

Example:

 

In your Mail Script use:

 

var custName = current.variables.customer_name.getDisplayValue();

template.print(custName) 

 

💡Remember to include your Mail Script in the Notification using syntax:

 

${mail_script:show_customer_name_variable}  or whatever the name of your mail script is. 

***If Correct/Helpful please take time mark as Correct/Helpful. It is much appreciated.***

Regards

Paul