Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon1.gif   Is it possible to only send an email based on the value of multiple attributes?, posted by Darren Hollinrake on Mon Mar 9 17:03:38 2015 
    icon2.gif   Re: Is it possible to only send an email based on the value of multiple attributes?, posted by Stefan Ritt on Mon Mar 9 17:24:42 2015 
    icon2.gif   Re: Is it possible to only send an email based on the value of multiple attributes?, posted by Andreas Luedeke on Thu Mar 12 09:53:57 2015 
Message ID: 67822     Entry time: Thu Mar 12 09:53:57 2015     In reply to: 67820
Icon: Reply  Author: Andreas Luedeke  Author Email: andreas.luedeke@psi.ch 
Category: Question  OS: Windows  ELOG Version: 2.9.2 
Subject: Re: Is it possible to only send an email based on the value of multiple attributes? 

Darren Hollinrake wrote:
My current setup notifies users if downtime = yes.
Email Downtime Yes = user1@xyz.com, user2@xyz.com

Is it possible to only send an email based on the value of multiple attributes?
For my use:
user1 only needs notifications if Platform = Workstation and Downtime = Yes
user2 only needs notifications if Platform = Network and Downtime = Yes



I think there is a solution, although it is complicated and I haven't tested it:

You can have an invisible field that is set based on a calculation from several fields, and use this field for the conditional email notification.
Just to give an idea, something like:

Subst myUser1Note = $shell( if [ $Platform = "Workstation" ] && [ $Downtime = "Yes" ] then echo "notify";else echo "idle";fi)
Email myUser1Note notify = user1@xyz.com

And if you like you make this field invisible by skipping it in:
Show Attributes = ...
and
Show Attributes Edit = ...


Just an idea...

Andreas
ELOG V3.1.5-fe60aaf