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.
- Open the tab.
-
Select
Add.
The New Validation Method window is displayed.
- In the Name field, enter a validation method name.
-
Select the
Multi-field Script Validation from the
Type list and select
OK.
The multi-field script validation properties window is displayed.
-
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,
Delete,
Move Up, and
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
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)
-
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
Validate.
A message is displayed below the input field telling you the entered text is valid, or explains why it is not valid.
-
Select
Close to save your multi-field script validation method.
The multi-field script validation is added to the list of validation methods.
- Optional. Repeat the above steps to add another multi-field script validation method.
- Optional. Click OK to close the Project Settings window.
-
Optional. Add one or more of the following: