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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Email Alert with a variable as email?

I am creating an alert which I want to send an email to a specific person based on a condition. So I have set up a variable that will hold the email address of the person who created this condition. Sometimes this will be more than one email, so I can't just "hard code" these emails into the mail recipients area of the alert. I've tried to use the variable as $(vVariable)  in the mail recipients area but that doesn't work either. Can anyone help me with this?

Thanks

5 Replies
Not applicable
Author

I can make the variable hold the email and display it in a sheet object, but i need it to send it to the email address in the alert by entering the variable as the email. Can anyone help?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I don't know whay variables wouldn't work in the Mail Recipients field. Can you post the entire expression you are using in the field?

-Rob

http://robwunderlich.com

Not applicable
Author

Hey Rob,

So I have a variable called vEmail which hold the following:

if(aggr(if(count(distinct( ShippingPlant)) > 1 AND ShipOrderComplete = 'C', Count(NewDate)), SO_NO) > 0, Email)

I put the variable in a text object as =$(vEmail) and it is giving me the right email. However when I put in in the "mail recipients" area of the alert as =$(vEmail) it does not work. Any ideas?

Thanks ,

Alex

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Some questions.

1. If you hard code an email address in the alert, does the email get sent?

2. When you say "it doesn't work" as a variable, does this mean the email doesn't get sent or some other error?

-Rob

Not applicable
Author

Yes, hardcoded email works fine. When the variable is put in no email gets sent. There is no error message.

Thanks,

Alex