Creating Event Handlers

In its most basic form, an event handler consists of these parts:

  • An association with a particular event
  • A handler sequence number
  • One or more actions to perform when the event is triggered

To create an event handler:

  1. Open the Event Handlers form.
  2. Click the  Filter-in-Place tool bar button.
  3. Select Actions > New.
  4. In the Event Name field, either select an existing event, or specify a new event name for which you want to define a handler.
  5. Specify a description for the handler. This description is helpful when you have multiple handlers with the same name, because it allows you to find the appropriate handler in a list.
  6. Optionally, use the  Keep With and Chronology fields to control the handler sequence with respect to other developers' handlers.
  7. Save the new event handler.
  8. Click Event Actions to open the Event Actions form and create the actions to be performed when this event handler is executed.
  9. Save your changes and close the Event Actions form.
  10. Set the other options on the Event Handlers form as desired. For information about these options, see the online help for each option.
  11. To see a graphical (diagrammatic) representation of the event handler and its actions, click Diagram, which opens the Event Handler Diagram form. This form also allows you to edit and even add event actions to the event handler flow.
  12. Save the event handler.
Note: Events and event handlers are defined for an application database, not a particular site. To allow an event handler to run only at certain sites on a database, specify the sites in the Applies To Sites field on the Event Handlers form.

For more information, see the section about event handlers in the Guide to the Application Event System.