Skip to main content
Version: Deprecated Pages

system.alert.acknowledgeAlert

caution

Ignition version 7.6 introduced a new alarming system. All of the associated functions can be found under the system.alarm section.

Description

Acknowledges an alert, as specified by a system, path, and stateName. When run in a Client script, the currently logged-in user will be recorded as having acknowledged the alert. When run in a Gateway script, you must provide a username that will be recorded with the acknowledgement, since no user actually acknowledged the alert.

Syntax

system.alert.acknowledgeAlert(system, path, stateName)

  • Parameters

    • String system - The originating system for the alert being acknowledged.
    • String path - The path to the alert being acknowledged.
    • String stateName - The alert state name to acknowledge.
  • Returns

    • Nothing
  • Scope

    • Client

Syntax

system.alert.acknowledgeAlert(system, path, stateName, user)

  • Parameters

    • String system - The originating system for the alert being acknowledged.
    • String path - The path to the alert being acknowledged.
    • String stateName - The alert state name to acknowledge.
    • String user - A username to use for who acknowledged this alert. Only available in the Gateway-scoped version of this function.
  • Returns

    • Nothing
  • Scope

    • Gateway

Examples

Code Snippet
#This example shows the basic syntax for acknowledging an alert.

system.alert.acknowledgeAlert("SQLTags.default", "[default]Alm_ESTOP", "ALM_STOP")
Code Snippet
#This code snippet could be used as a mouseReleased event handler on a
#Table component whose data was the return value of the system.alert.queryAlertStatus function.
#It would present a right-click menu to acknowledge the currently selected alert.

row = event.source.selectedRow
if row != -1:
data = event.source.data
alertSys = data.getValueAt(row,"System")
alertPath = data.getValueAt(row,"Path")
alertState = data.getValueAt(row,"State Name")
def ack(event, aSys=alertSys, aPath=alertPath, aState=alertState):
import system
system.alert.acknowledgeAlert(aSys,aPath,aState)

menu = system.gui.createPopupMenu({"Acknowledge":ack})
menu.show(event)