The CreatorCon Call for Content is officially open! Get started here.

Email notification condition on who receives an email

SC10
Kilo Guru

Under an email notification of mine, I want to script a condition that will control who will receive the email, not a condition to control when it will send.

My email recipients are currently dynamic from fields on my Request form, Requested By (custom) and Client. In my situation, I want this Request notification email to only go to the username in the "Requested By" field if there are not part of a certain user group (IT ServiceDesk). If they are part of the IT ServiceDesk group as "Requested By", there is simply no reason why they would need to receive this Request opened notification email (due to them already logging it, they'd know about the request).

Any ideas?

10 REPLIES 10

postwick
Giga Expert

Not sure if you can script the "to" address, but you can script CC and BCC:



How to set "Who will receive" through mail script?



According to this thread, you can script the "to" address...but it's a little complicated.



How to Add "To" Address in email


My email notification is a straight notification, rather than a template with an email script. Would that matter?


No.   You could either write an email script to populate the cc/bcc and reference it with ${mail_script:ScriptName} or you could just put it directly into the Notification with <mail_script></mail_script>



If you want to completely avoid this type of solution, just create a separate Notification with conditions of "if Requested By is in X group" (and your other conditions) and only have this Notification notify the Requested By.   Then your original Notification would remain, and just notify Client.  


Creating the second notification seems like my best bet, however when doing so and using the condition builder, when I select my "Requested by --> User Fields" option, I am not seeing anything related to Assignment Group or Group. I believe this is because Group and/or Role information, is assigned to my users as Related Lists, and not directly on the table information. Any way I can work around this restriction?