Wizard Control Events

Wizard forms and their subforms have these wizard form-specific events (some occur on the wizard form and some on its subforms), and they typically occur roughly in this order:

  • Wizard is Initialized

    This form-level event indicates that the form and control have been created, security has been applied, system variables have been initialized, and form data structures have been loaded. It is the only event on which you should use the Set Wizard Form Mode system function (to change the form mode to add, update, or copy), and the only one of two events on which you should use Set Selected Wizard Page (to start at a page other than the first visible, enabled page in the index).

    Wizard is Initialized is also where you should hide, show, disable, or enable a page, or suppress page processing for a page, as appropriate. Finally, this is also when you should rearrange the page order if necessary (Set Wizard Page Index).

  • Post Wizard is Initialized

    This form-level event fires immediately after Wizard is Initialized, indicating that the initialization process is complete and runtime is poised to enter the first page in the wizard. Any logic that should be applied to the Wizard is Initialized event can be applied here also. You can use the Set Selected Wizard Page system function on this event, but not after; runtime determines which page is the "first page" to enter based in part on whether you set a selected page.

  • WIZARD:Subform is Initialized

    This subform-level event indicates that a subform has been initialized (including the standard processing for subforms in add mode). The event fires for each subform in the wizard control, in order. This event is called only once during the life cycle of a wizard form per session. If the user worked on the wizard previously and saved (that is, if this is a reentry), this event can be used to load previous session data and then assign the data to form controls and ER variables.

  • WIZARD:Subform is Entered

    This subform-level event indicates that the page status is incomplete, that parent mapping links have been reestablished, and that the SI values have been updated. The event fires every time a user visits a page by accessing it from a previous page. The SI values should contain all current information. Assign SI values to form controls and grid rows if necessary. Set filter values and QBEs at this point if the Automatically Find On Entry option is enabled.

  • WIZARD:Post Subform is Entered

    This subform-level event indicates that any processing required by the Automatically Find on Entry option is complete. This event is called every time a user visits this page from an earlier page. This is called after the Subform Entered event and after the automatic data fetch if Automatically Find On Entry is enabled.

  • WIZARD:Save for Re-entry

    This subform-level event fires on every page, except those on which Suppress Validation and Save is enabled, when the user clicks the Save for Re-entry button. the application should save the data on the current page to a temporary working table on this event.

  • WIZARD:Validate Subform

    This subform-level event occurs before runtime conducts customized validation of the form controls and grid rows. Runtime always performs the data dictionary validations unless the Suppress Validation and Save option is enabled for the page. At this point, the application code should set the page status to complete by calling he system function Set Wizard Page Status.

  • WIZARD:Subform is Exited

    This subform-level event fires once for each subform in the control after the transactions have been processed and runtime is preparing to close the wizard form. It is the last subform-level event to fire for each subform before the wizard closes. On this event, the application should copy form controls or grid rows to SI variables, then call the Update Parent subform system function to update the wizard form. You can perform this call conditionally, such as when the user clicks Next or Finish.

  • Page is Exited - Before

    This form-level event indicates that subform validation is complete. It is the last event to fire before runtime exits the current subform.

  • Page is Exited - After

    This form-level event fires immediately after any logic on Page is Exited - Before finishes processing.

  • Wizard is Finished - Before

    This form-level event indicates that page-level validation is complete and that runtime is about to begin passing data from the wizard to the business view.

  • Wizard is Finished - After

    This form-level event fires after the business view is loaded with data from the wizard form but before the data is committed to the database. It is on this event that you should code any data operation that needs to be included in the transaction. Do not trigger a form interconnect on this event.

  • Wizard is Exited

    This form-level event fires before form close; it is the last event to fire. This is the point at which you should add code to clean up caches and other resources used by the wizard. If you require a form interconnect (such as for a confirmation form), this event occurs outside the transaction boundary and is therefore safe to use to trigger the interconnection.

Note: Even though wizard control may resemble a tab control, none of the tab page events are fired for wizard pages. Wizard pages are not tab pages.