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

DELETE^XQALERT: Clear Obsolete Alerts

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

Description

The DELETE^XQALERT API deletes (clears) a single alert, 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.

DELETE^XQALERT, unlike DELETEA^XQALERT, deletes only a single alert whose alert identifier matches the complete Alert Identifier.

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

Format

  DELETE^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) Alert Identifier of the alert to delete. It must be a complete Alert Identifier, containing all three semicolon pieces:

  1. The first semicolon piece (Package Identifier) must be in the same form as the alert creator defined it.

  2. The second piece being the DUZ of the user who created the alert.

  3. The third piece being the time the alert was created.

NOTE: The second and third pieces are defined by the Alert Handler.

XQAKILL:

(optional) XQAKILL determines how the alert is deleted:

  • If XQAKILL is undefined or zero (0), the Alert Handler deletes the alert for all recipients.

  • If XQAKILL is set to 1, Alert Handler only purges the alert for the current user, as identified by DUZ (using a value of 1 only makes sense if the current user is also a recipient of the alert, however).

If the software application identifier portion of the alert identifier is "NO-ID", however, the alert is treated as if XQAKILL were set to 1 (i.e., the alert is deleted only from one user), regardless of how it is actually set.

Output

none.