Email Template Subject line

Chris Ingram
Mega Expert

Hi all,

I am in the process of creating email templates in ServiceNow for the Major Incident Module to utilize.  One of my requirements is to have the subject line Include the INC# and the short description.  I have hit a wall on how to have these two fields pulled automatically.  I can get one field to pull but not both.  I am sure this a simple script that I am missing.  Can anyone help with is?  

Example - find_real_file.pngthis pulls the short description, 

but I need it to pull both the short description and the INC#

4 REPLIES 4

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

The number would be:

${incident_alert.source_incident.number}

 

Include that in the template subject.

Ethan Davies
Mega Sage
Mega Sage

Hi Chris,

 

As has been suggested you could do ${incident_alert.source_incident.number}.

 

Then ${incident_alert.source_incident.short_description} as you have already mentioned.

 

A good pointer is to be wary of which TABLE you the notification for this template is using. For example if it is the 'incident' table then you can just directly reference the incident like so ${incident.number}.

Alternatively, it may be the case that you are using a table that contains a reference to the record and thus you will have to dot walk which is being done in ${incident_alert.source_incident.short_description}.

 

Note: Make sure there is no 'Subject' that is defined in the Notification from which you are calling the template as this will take precedence anything that is defined in the template.

 

Thanks, 

Ethan

Chris Ingram
Mega Expert

So, my only option is use 

find_real_file.pngfind_real_file.png?

Is there a shorter script option?  When I tried to run as above before it would not let me type it all in.  Ran into a space issue.  And when I shorted up Service Interruption to just Update it does fit but it all appears almost like a sentence with no spacing in it.

Chris Ingram
Mega Expert

I think I figured it out.  I just don't get to have the additional space I was looking for in the subject line.

Thanks guys!

find_real_file.png