Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Add global variable to tSendMail subject

Who am I able to add a global variable to the subject of tSendMail? Whenever I try it is not adding the global variable to the subject. I was able to get it to work for the body of the email but can't seem to get the subject to work.

 

0683p000009M9IG.png

 

In the above picture the body works but for some reason the subject does not. Any advice to getting this to work?

Labels (2)
5 Replies
Anonymous
Not applicable
Author

This may or may not be the issue, but you should be casting to the appropriate data type when you retrieve values from the globalMap

(String)globalMap.get("myJob")
Anonymous
Not applicable
Author

Unfortunately, that was not the issue but thank you for the information. I will update them now to use casting.

Anonymous
Not applicable
Author

Is the global being set correctly/before you send an email?

Usually you can just reference the job's name from  built-in value

jobName
Anonymous
Not applicable
Author

Not sure to be honest. I only ever did it as (String)globalMap.get("myJob") and this works other places such as the email body and sql queries but not in the subject line so not sure what is going on.
Anonymous
Not applicable
Author

I think for some reason the global variable is empty because the following when I send it outlook says the email has no subject.

(String)globalMap.get("myJob") + "ESB Job Failure"
and
(String)globalMap.get("myJob")

I can't think why since it works fine in the body of the email which is apart of the same thing