Trigger macros

All triggers have access to a set of trigger macros that provide information related to the execution of the trigger. These trigger macros are available to trigger actions as a source or input variable.

The following example shows the reference to the trigger macros as the source to a Set action:

Trigger macros are never available to trigger actions as a destination or output variable.The trigger macros are:

Trigger macro

Data type

Description

$EVENT_TIME

TIMESTAMP

The date and time that the trigger event occurred.

$EXECUTION_EVENT_TIME

TIMESTAMP

The date and time that the trigger execution occurred. In most cases, this will be the same as $EVENT_TIME.
When the execution of the trigger is delayed because of trigger instance queuing, the two times could vary.

$TIME_IN_QUEUE

INT4

The time that the trigger instance waited in the trigger instance queue before starting execution.

$LAST_ERROR

INT4

The last error value encountered by the trigger.

$LAST_ERROR_STRING

STRING

The last error value encountered by the trigger in a STRING data type.

$PROJECT

STRING

The name of the project that this trigger belongs to.

$TRIGGER

STRING

The name of the trigger.

$MODULE_NAME

STRING

The node name where this trigger is executing.

$NULL STRING Use this macro to specify a NULL value to an input variable of an action. This can be used to set a column or stored procedure parameter value to NULL when executing a database transaction action.