I have created a tag that an operator can toggle on/off from a scrren.
How can I use a Tag to enable or disable notification.
Thanks in advance.
Ric Buehler
I have created a tag that an operator can toggle on/off from a scrren.
How can I use a Tag to enable or disable notification.
Thanks in advance.
Ric Buehler
Are you talking about enabling/disabling notification for the alarm associated with a tag? If so, you can use the AlertExecEnabled property of each tag to turn the alarms on and off. You can access tag properties with a . just like component properties. ie (in an expression):{New Tag.AlertExecEnabled}
Or do you mean the distribution group? Those groups are stored in the database and you can add&& 1=0
to the end of the expression when you want to turn it off. Just remove that bit to turn it back on.
I hae a DB tag named NotifyOperator (boolean).
When it is true I want notifications to go out.
When it is false I want to block notifications.
How do I refer to this tag in the Grooup Expression under the notification.
If you want a snippet to be added automatically, you can set up a Gateway Event Script and run it off of a Tag Change event. In it, just get the expression from the database, add/remove the text you need and write back to the db. Something like this:value = system.tag.getTagValue("New Tag")
expression = system.db.runScalarQuery("SELECT expression FROM alert_distro_groups WHERE alert_distro_groups_ndx = 4")
if value == 1:
expression = expression[:-7]
else:
expression = %expression + " && 1=0"
system.db.runPrepUpdate("UPDATE alert_distro_groups SET expression = ? WHERE alert_distro_groups_ndx = 4", [expression])