--- title: "system.alert.acknowledgeAlert" description: "Acknowledges an alert, as specified by a system, path, and stateName." --- # system.alert.acknowledgeAlert > Acknowledges an alert, as specified by a system, path, and stateName. ## 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 ```python title="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) ```