Subject line for an approval email

Christian22A
Tera Contributor

I have a request that requires approval.  There is an email that is created upon submission of the request.  In the subject line of the email the short description and the user who the request is for should be displayed.  This is what I have in the subject line ( ServiceNow pending approval - ${sysapproval.short_description} - ${document_id.requested_for} ).  The short description displays correctly, however ${document_id.requested_for} does not return the user who requested the catalog item (requested_for) and instead returns the user who created the request (opened_by).  Can someone provide some insight into what is being done incorrectly?

1 ACCEPTED SOLUTION

Yea, seems like its request.requested_for not RITM's requested_for.

You have two options:

 

  • Use request.requested_for in the email subject. e.g.  ${document_id.request.requested_for}, or
  • Use the 'Requested for' variable/or ensure the RITM's requested_for variable is updated corrctly

I am guessing your organization only allows a single requested item per request by looking at the design. If your organization will consider allowing multiple RITMs per request, you will have to go with the 2nd option and this will require some effort.

 

Cheers

View solution in original post

5 REPLIES 5

James Chun
Kilo Patron

Hi @Christian22A,

 

Can you confirm which table the approval record is created against? Is it a Request [sc_request] or a Requested Item [sc_req_item]?

I am assuming the 'requested_for' field for that table is not being set correctly and using the default value which is the 'opened_by'.

 

Cheers

Christian22A_0-1713383518441.png

Christian22A_1-1713383651876.pngChristian22A_2-1713383706881.png

The approval is created against the RITM

Can you verify if the 'requested_for' is from the RITM table or the Request table?

I have often seen where the 'requeted_for' on the RITM form is a dot-walked field from the Request table.

You can do this by going into the Form Layout'

JamesChun_1-1713384289332.png

 

 

 

Christian22A_0-1713384924325.png

from the RITM