Skip to main content
Kofax

Enable normal Validation processing when document called back to Validation after Document Pre Processing

14012

QAID # 14012 Published

Question / Problem:

A Document Class uses an Index Script to bypass a Document using the “SaveAndSkipDocument” return code during the Document Pre Process function (“KfxDocPreProcess”).

How can the script be configured to enable normal Validation processing when the Document is called back to Validation after the initial pass-through?

Answer / Solution:

The best technique is to detect if the Document has already been processed. If so, then set the “NoError” return code instead of “SaveAndSkipDocument”.

If the Document has previously passed through Validation, the “AlreadyProcessed” flag is set. The template Index Script makes note of its use in the remarks (REM) section of the “KfxDocPreProcess” function and makes use of this flag to set the return code to “NoError” by default:

If (AlreadyProcessed) Then
    KfxDocPreProcess = NoError
    Exit Function
End If

If “AlreadyProcessed” is true, the Document has already been processed and indicates that the Document is being processed on a second or subsequent attempt.

Applies to:

Product Version
CAPTURE 10.0
  10.1
  10.2
  11.0