# Notification - Group Expression

**URL:** <https://forum.inductiveautomation.com/t/notification-group-expression/2258>\
**Category:** Ignition\
**Created:** [October 12, 2010, 9:43pm UTC](https://forum.inductiveautomation.com/t/notification-group-expression/2258 "2010-10-12T21:43:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rfbuehler](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rfbuehler](https://forum.inductiveautomation.com/u/rfbuehler)\
**Post date:** [October 12, 2010, 9:43pm UTC](https://forum.inductiveautomation.com/t/notification-group-expression/2258/1 "2010-10-12T21:43:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [October 12, 2010, 10:11pm UTC](https://forum.inductiveautomation.com/t/notification-group-expression/2258/2 "2010-10-12T22:11:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rfbuehler](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rfbuehler](https://forum.inductiveautomation.com/u/rfbuehler)\
**Post date:** [October 12, 2010, 10:49pm UTC](https://forum.inductiveautomation.com/t/notification-group-expression/2258/3 "2010-10-12T22:49:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [October 12, 2010, 11:46pm UTC](https://forum.inductiveautomation.com/t/notification-group-expression/2258/4 "2010-10-12T23:46:52Z")

</div>

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])`
