Set up a validation form script event

The validation form and its elements are available via script and several script events are provided to get access to those elements. The following script events allow access to the validation form and its elements:

  • AfterComboboxItemSelected

  • AfterFieldChanged

  • AfterFieldConfirmed

  • AfterTableCellConfirmed

  • AfterTableRowAdded

  • BeforeComboBoxDropDown

  • BeforeFieldGetFocus

  • BeforeTableCellGetFocus

  • BeforeTableRowDeleted

  • ButtonClicked

  • DocumentLoaded

  • FieldGotFocus

  • TableCellGotFocus

For detailed information about of the complete set of script events see Script Documentation.

You can set up a validation form script event by following these steps:

  1. Open the Project Tree window if it is not already open.
  2. Select the class from the Project Tree to customize its validation form.
  3. On the Design tab, in the Validation Forms group, select Customize.

    If there is a single validation step only, the Validation Form Layout window is displayed automatically. If there are multiple validation steps configured, select an individual step to view the Validation Form Layout window to customize a specific step.

  4. Insert a field or control that requires some scripting.

    For example, add a button to the form and define how the button behaves when clicked.

  5. Define the script.
    1. Select from the Tools menu Script Wizard to open the wizard.
    2. Select the desired validation event in the list.
    3. Select the fields or controls that require script code. Appropriate code is generated based on your selections.
    4. Click Selectand then Copy.
    5. Click Show Script to open the Script Code window.
    6. Select Edit, and then select Pastefrom the context menu to insert the sample code. You can then edit the code as needed.
    7. Close the Script Code window.
  6. Click Close to exit the Script Wizard window.
  7. From the Window menu select Close.

    The Validation Form Layout window is closed and your validation form settings are saved.

  8. Save the changes to your project.