Kernel 8.0 APIs Banner
Office of Information and Technology (OIT) Banner
[skip navigation]

DELETEA^XQALERT: Clear Obsolete Alerts

Reference Type: Supported, Category: Alerts, ICR#: 10081

Description

The DELETEA^XQALERT API deletes (clears) all alerts with the same software application identifier, for the current user (XQAKILL=1) or all recipients (XQAKILL=0 or XQAKILL undefined). The current user (as identified by the value of DUZ) does not need to be a recipient of an alert; however, in that case, only a value of zero (0 or undefined) for XQAKILL makes sense.

One example of the use of DELETEA^XQALERT is when a troublesome condition has been resolved. You can use this API to delete any unprocessed alerts associated with the condition. It deletes all alerts whose software application identifiers match the software application identifier you pass in the XQAID input variable (multiple alerts can potentially share the same software application identifier).

REF: For more information on software application identifiers, see the "Package Identifier versus Alert Identifier" topic in the Kernel 8.0 & Kernel Toolkit 7.3 Developer's Guide.

Format

  DELETEA^XQALERT

Make sure to perform the following steps before calling this API:

  1. NEW all non-namespaced variables.

  2. Set all input variables.

  3. Call the API.

Input Variables

XQAID:

(required) All alerts whose software application identifier matches the value of this input parameter are deleted, for the alert recipients designated by the XQAKILL input variable.

The form of XQAID can be exactly as initially set when creating the alert. Alternatively, it can contain the two additional semicolon pieces added by the Alert Handler (the full alert identifier). The two additional semicolon pieces are ignored, however; this API only requires the original software application identifier.

If the alert identifier you specify is "NO-ID", however, (the generic software application id assigned to alerts with no original software application identifier), this API does not delete matching alerts.

XQAKILL:

(optional) XQAKILL determines how the alert is deleted. If XQAKILL is:

  • Undefined or Zero (0)—The Alert Handler deletes matching alerts for all recipients.

  • Set to 1—Alert Handler deletes matching alerts for the current user, as identified by DUZ.

    NOTE: Using a value of 1 only makes sense if the current user is also a recipient, however).

Output

none.