Interactive Triggers
Interactive triggers are script modules that are asynchronously executed in response to events associated with a specific object in a user interface component. Such events are usually user actions, such as changing a field value or clicking a button, but they may also be invoked in ProcScript by the macro command and callfieldtrigger command.
The interactive triggers that are associated with an object in the user interface depend on the type of component, the type of object, and the type of widget (that is, its user interface representation). Some objects may have no associated interactive triggers, some have many.
For example, an entity occurrence may be represented by an Attributes Only widget in a dynamic server page. The entity occurrence has no triggers, but the widget has many. A field may be represented by an Edit Box widget, in which case both the field and the widget may have an associated interactive trigger—the field has a detail trigger and the Edit Box has an OnEdit trigger.
Depending on the component and widget, interactive triggers can be declared using the trigger or webtrigger ProcScript statement.
Object Type | Component Type | Trigger |
---|---|---|
Application | Application Shell | menu
keyboardSwitch userKey pullDown |
Component | Form | clear
erase getFocus loseFocus menu pullDown quit retrieve retrieveSequential store userKey |
Entity | Form | create
help leaveModified leaveModifiedKey leavePrinted loseFocus menu remove |
Field | Form | detail
getFocus help loseFocus menu next previous startModification valueChanged |
Field | DSP | detail |
Field | USP | detail |
Field | FRM, RPT | detail |
Widget 1 |
DSP | OnBlur
OnEdit OnChange OnClick OnFocus ... |
Form | collapse
movefrom columnwidth LoadError resized ... |
|
Header, trailer, and break frame | getFocus | |
Menu item | select | |
Menu item | preDisplay |
1 For Dynamic Server Page and Form components, many field-level widgets are available. For information on the triggers that these widgets support, consult the widget documentation. For more information, see Widget Reference: Dynamic Server Pages and Widget Reference: Forms and Reports.
Interactive Triggers for Forms
Interactive triggers in Form components
can be fired in response to user events and by the macro ProcScript statement,
which emulates those events. For example, macro ^ACCEPT
issues an Accept request
that activates the accept trigger.