Add a multi-field script validation method

Use the procedure in this topic to add a multi-field script validation method.

Add a Multi-field Script Validation method to perform more complex invoice calculations to ensure the total amount is correct. If the first part of the rule fails, subsequent parts are not executed.

If you change the event type, the script sample also changes. Update your project or class script accordingly.

Procedure
  1. Open the Project Settings > Validation tab.
  2. Select Add icon Add.

    The New Validation Method window is displayed.

  3. In the Name field, enter a validation method name.
  4. Select the Multi-field Script Validation from the Type list and select OK.

    The multi-field script validation properties window is displayed.

  5. Configure the following setting:

    Setting

    Description

    Required Fields

    A table that displays a list of fields that are added for use in this validation method. As you add fields, the script sample is updated.

    Use the Add icon   Add, Delete icon   Delete, Move Up button   Move Up, and Move Down button   Move Down buttons to manage the list of required fields.

    The Script Sample is updated automatically when fields are added, moved, or deleted.

    Script Sample

    By default, this area contains the multi-field script sample that you can modify to meet your own needs.

    You can modify the script by using the Select and Copy buttons to place the code in an appropriate location in the script editor.

    Optional. Select Show Script Script Icon to view and edit the script in a larger window.

    Please select the data type you want to use in script

    Select a data type to be used in script. (Default: Strings)

  6. Optional. Test your settings.

    Configuring a multi-field validation method involves several fields. When testing this validation method, enter data for multiple fields to simulate extraction and validation. Also, validation methods are not yet assigned to document fields, so specify temporary formatters if the script code relies on the DoubleValue or DateValue property.

    Enter values in the Test Value column of the Required Fields table, select a value from the Specify a field formatting here for testing date or double values inside the script list, and select Valid Field Result icon Validate.

    A message is displayed below the input field telling you the entered text is valid, or explains why it is not valid.

  7. Select Close to save your multi-field script validation method.

    The multi-field script validation is added to the list of validation methods.

  8. Optional. Repeat the above steps to add another multi-field script validation method.
  9. Optional. Click OK to close the Project Settings window.