David Crewe Ltd


Kofax Consultancy

Applying Conditional Validation

In the scripts shown below we will see how to mark documents valid when certain criteria are met.

We will write a function to test for ALL document fields being populated, and another to test for ALL document fields being of a minimum confidence level.

These are fairly common methods to determine whether or not a user needs to see the document in Validation, but you can apply other tests using the same basic method outlined here.

Define your batch class structure as normal.



Add a Document Validation Script to the relevant Document Class(es). Select VB.NET as Scripting Language, and Create.



Add the following functions to the Document Validation Script:

AllFieldPopulated

AllFieldsMinimumConfidence.





Using the drop downs, select the DocumentPreProcessing event and add the line as shown.



Note: The line above will skip a document where all fields are populated OR all fields have a minimum confidence of 90% (this value can be set in the call to the function). You can use variations of the function calls to skip a document where all fields are populated AND all fields have a minimum confidence, or simply use one or the other of the tests.

In Validation any documents which matched the tests chosen will be skipped. Only those which did not will need to be checked.



NOTE: If you forcibly skip documents in this way, other scripts and/or lookups may not run, so ensure that you fully understand all document processes before implementing such a solution.

Recognition scripting guide


Validation scripting guide


Back to scripting overview