Alert Acknowledge

I have an alert summary table set up in my project which is working fine. However, along with acknowledging the Ignition alerts, I need to write to a couple of OPC tags to acknowledge the alarm in the control system. I would like to do both from the same button. Does anyone have an idea of how I can accomplish this? Thanks.

Sure, this isn’t too hard. The idea is that you’ll set the Alert Summary table’s Ack Buttons Location property to Hidden, and then drop your own button beneath the table so that you can implement your own acknowledgement logic.

For example, you could use this script on the button’s actionPerformed event to acknowledge the alert and alse do your own custom logic:

[code]table = event.source.parent.getComponent(“Alert Summary”)

selRow = table.selectedRow
alerts = table.alerts

if selRow != -1:
alertSys = alerts.getValueAt(selRow,“System”)
alertPath = alerts.getValueAt(selRow,“Path”)
alertState = alerts.getValueAt(selRow,“State Name”)
# Perform your own logic here[/code]

You could bind the button’s Enabled property to an expression like this so that the button only became enabled when the user had selected an unacknowledged alert:

{Root Container.Alert Summary.selectedRow}!=-1 && !try(toBoolean({Root Container.Alert Summary.alerts}[{Root Container.Alert Summary.selectedRow},"Acked"]),true)

Hope this helps,


That was very helpful. As a follow-up, what if I needed to do an “Acknowledge All” in this same scenario? Thanks.

Same idea, just loop through all of the rows in the dataset. You can check the value of the “Acked” field to see if the alert on that row needs acknowledgement or not.

Thanks for the nudge in the right direction. That did the trick.