Indexing - Data Record Processing Scripts

Use the methods in the DataRecordIndexingScript class to validate or change index filed values at the batch, folder or document level. Check the "Use custom scripts to populate and validate index fields" checkbox and press the Open Script Editor button.

DataRecordIndexingScript Class


For Batch Level

BatchDataRecordInitialize Method

The BatchDataRecordInitialize method is called in the Capture / Import module just after a batch is created. Use this script to pre-populate batch-level index fields.

Parameters:

DirectionsParameterTypeDescriptions
INbatchIBatchThe current batch
dataRecordIDataRecordThe record containing the batch-level index fields

BatchDataRecordIndexing Method

The BatchDataRecordIndexing method is called from the Create Batch dialog in the Capture / Import module when a batch is first created. It is also called in the Index module during auto indexing, just after lookups for the batch index fields complete. Use this method to verify and correct values before normal validation occurs.

Parameters:

DirectionParameterTypeDescription
INbatchIBatchThe current batch
dataRecordIDataRecordThe data record containing the batch-level index fields

BatchDataRecordValidated Method

BatchDataRecordValidated is called after indexing processing and default validation of the batch record. It performs custom validation of all batch index fields. It is called from the following modules:

  • Auto import – at the start of document auto-processing
  • Capture/Import – when closing a batch
  • Index – at the start of auto-indexing and when closing a batch 
  • QA – at the start and end of QA auto-processing, and when closing a batch

It is also called whenever the user presses the Validate Batch icon, such as in the QA module screen to the right. 

Return true from this method to indicate the batch data record is valid, or false to indicate it invalid.

 

 

 

Parameters:

DirectionParameterTypeDescription
INbatchIBatchThe current batch
dataRecordIDataRecordThe data record containing the batch-level index fields
validatetrue/falseTrue if the record is currently valid, false if it is not
IN/OUTvalidationMessagestringA user-defined, custom validation message

Returns:

True or False

BatchDataFieldIndexing Method

This method is called from the Index module at the start of auto-index processing. It is called for each batch index field.

Parameters:

DirectionParameterTypeDescription
INbatchIBatchThe current batch
dataRecordIDataRecordThe data record containing the batch-level index fields
dataFieldIDataFieldValueThe current data field within the batch record

BatchDataFieldBeforeValidation Method

This method is called prior to validation of each data field in the batch data record.

Parameters:

DirectionParameterTypeDescription
INbatchIBatchThe current batch
dataRecordIDataRecordThe data record containing the batch-level index fields
dataFieldIDataFieldValueThe current data field within the batch record

BatchDataFieldValidated Method

The BatchDataFieldValidated method is called after index processing and normal validation of all batch index fields. It runs for each index field in the batch data record. Return true from this method if the data field passes validation, or false if it does not.

Parameters:

DirectionParameterTypeDescription
INbatchIBatchThe current batch
dataRecordIDataRecordThe data record containing the batch-level index fields
validatetrue/falseTrue if the record is currently valid, false if it is not
IN/OUTvalidationMessagestringA user-defined, custom validation message

Returns:

True or False


For Folder Level

FolderDataRecordInitialize Method

The FolderDataRecordInitialize method is called when the folder data record is first created. It is called during Capture / Import as each folder is created, and in the QA module when the client elects to manually create a new folder. Use this method to initialize folder index fields or folder properties.

Parameters:

DirectionParameterTypeDescription
INfolderIFolderThe current folder
dataRecordIDataRecordThe data record containing the folder-level index fields

FolderDataRecordIndexing Method

The FolderDataRecordIndexing method is called prior to running (or re-running) zone OCR and OMR for folder-level indexes. Use this method to initialize folder index fields or folder properties.

Parameters:

DirectionParameterTypeDescription
INfolderIFolderThe current folder
dataRecordIDataRecordThe data record containing the folder-level index fields

FolderDataRecordValidated Method

The FolderDataRecordValidated method is called after index processing and normal validation of all folder index fields. If one or more index values failed validation, the incoming “valid” parameter will be false. Use this method to return a custom error message or to programmatically correct validation issues in each of the data record’s fields. Return true from this method if the record passes validation, or false if it does not.

Parameters:

DirectionParameterTypeDescription
INfolderIFolderThe current folder
dataRecordIDataRecordThe data record containing the folder-level index fields
validboolTrue if the record is currently valid, false if it is not
IN/OUTvalidationMessagestringA user-defined, custom validation message

Returns:

True or False

FolderDataFieldIndexing Method

This method is called for each folder index field during auto-indexing. It is also called when a user selects a folder index field for editing in the Capture / Import or Index module screens, and when the user toggles on indexing in the Index module form. The script runs before zone OCR/ICR processing, so current OCR/ICR values are not available.

Parameters:

DirectionParameterTypeDescription
INfolderIFolderThe current folder
dataRecordIDataRecordThe data record containing the folder-level index fields
dataFieldIDataFieldValueThe current index field being processed

FolderDataFieldBeforeValidation Method

FolderDataFieldBeforeValidation method is called prior to validation of each data field in the folder data record. Use this method to initialize or modify index field values before validation occurs.

Parameters:

DirectionParameterTypeDescription
INfolderIFolderThe current folder
dataRecordIDataRecordThe data record containing the folder-level index fields
dataFieldIDataFieldValueThe current index field being processed

FolderDataFieldValidated Method

The FolderDataFieldValidated method is called after index processing and normal validation of all folder index fields. It runs for each index field in the folder data record. Return true from this method if the data field passes validation, or false if it does not. When returning false, you can also return a custom error message.

Parameters:

DirectionParameterTypeDescription
INfolderIFolderThe current folder
dataRecordIDataRecordThe data record containing the folder-level index fields
dataFieldIDataFieldValueThe current index field being processed
validboolTrue if the record is currently valid, false if it is not
IN/OUTvalidationMessagestringA user-defined, custom validation message

Returns:

True or False

 


For Document Level

DocumentDataRecordInitialize Method

The DocumentDataRecordInitialize method is called when a new record is created and added to a document, either manually or automatically. The record contains default values for each field.

Parameters:

DirectionParameterTypeDescription
INdocumentIDocumentThe current document
dataRecordIDataRecordThe new record for the document

DocumentDataRecordIndexing Method

The Index module (and the Capture/Import module, if the index option is selected) calls the DocumentDataRecordIndexing method when changing from one document to another (either manually or during auto-indexing), or when the user enables indexing through the menu bar toggle button. DocumentDataRecordIndexing is called before zone OCR runs. It is called for each record in the document.

Parameters:

DirectionParameterTypeDescription
INdocumentIDocumentThe current document
dataRecordIDataRecordThe current record for the document

DocumentDataRecordValidated Method

The DocumentDataRecordValidated method runs after document index processing and normal record validation, just prior to changing from one document to another during indexing. Return true from this method if the record passes validation, or false if it does not. When returning false, you can also return a custom error message.

Parameters:

DirectionParameterType

Description

IN  documentIDocumentThe current document
dataRecordIDataRecordThe current record for the document
validboolTrue if the record is currently valid, false if it is not
IN/OUTvalidationMessagestringA user-defined, custom validation message

Returns:

True or False

DocumentDataFieldIndexing Method

This method is called for each document index field during auto-indexing. It is also called when a user selects a document index field for editing in the Capture / Import or Index module screens, and when the user toggles on indexing in the Index module form. The script runs before zone OCR/ICR processing, so current OCR/ICR values are not available.

Parameters:

DirectionParameterTypeDescription
INdocumentIDocumentThe current document
dataRecordIDataRecordThe current record for the document
dataFieldIDataFieldValueThe current index field being processed

DocumentDataFieldBeforeValidation Method

DocumentDataFieldBeforeValidation method is called prior to validation of each data field in the document data record. Use this method to initialize or modify index field values before validation occurs.

Parameters:

DirectionParameterTypeDescription
INdocumentIDocumentThe current document
dataRecordIDataRecordThe current record for the document
dataFieldIDataFieldValueThe current index field being processed

DocumentDataFieldValidated Method

The DocumentDataFieldValidated method is called after index processing and normal validation of all document index fields. It runs for each index field in the document data record. Return true from this method if the data field passes validation, or false if it does not. When returning false, you can also return a custom error message.

Parameters:

DirectionParameterTypeDescription
INdocumentIDocumentThe current document
dataRecordIDataRecordThe current record for the document
dataFieldIDataFieldValueThe current index field being processed
validboolTrue if the record is currently valid, false if it is not
IN/OUTvalidationMessagestringA user-defined, custom validation message

Returns:

True or False


Miscellaneous

BeforeLookupsProcessed Method

The BeforeLookupsProcessed method is called before any Query lookup is run from the Capture, Index or Quality Assurance modules.

Parameters:

DirectionParameterType

Description

INbatchIBatchThe current batch
folderIFolderThe current folder
documentIDocumentThe current document
documentRecordIDocumentRecordThe current record for the document

AfterLookupsProcessed Method

The AfterLookupsProcessed method is called after any Query lookup is run from the Capture, Index or Quality Assurance modules.

Parameters:

DirectionParameterType

Description

INbatchIBatchThe current batch
folderIFolderThe current folder
documentIDocumentThe current document
documentRecordIDocumentRecordThe current record for the document

AfterBatchLoaded Method

The AfterBatchLoaded method is called when a batch is loaded into the Index module.

DirectionParameterTypeDescription
INbatchIBatchThe batch being loaded

On this page:

Related Pages: