Skip to main content
Kofax

How can a table be set to a valid or invalid state through script?

308228

Question / Problem: 

How can a table be set to a valid or invalid state through script? 

Answer / Solution: 

KTM does not support explicitly setting fields to a valid state through the script. 

The internal checks implemented in KTM require that all validation of fields, including tables, be handled through the use of Validation Rules and Methods. 

The ".Valid" property associated with items such as field objects should only be used to read the status of a field, not set the field's validity. 

Table validation works by validating each field (cell) individually. When all fields in a line item are valid, the line item is set to a valid state. When all line items are valid, KTM sets the table to a valid state.

A Single Field Validation Rule can be implemented for a field (cell) in the same manner as any other field. When selecting Single Field Validation Rule, it will list the fields including Table fields in the format "TableName:FieldName".

If multiple fields in a line item must be compared, use a Multi-Field Validation Rule with the option "Validation works on all rows of this table" and specify the Table name.

A Multi-field Script Validation method will need to be setup that takes into account the number of fields that need to be compared on the same line item. The Field Mapping for setting up the Multi-Field Validation Rule will allow for the mapping of the field names in the table to the Validation method specified in the Multi-field Script Validation method.
 

 

Applies to:  

Product Version Category
KTM  6.3 Scripting
KTM 6.2 Scripting
KTM  6.1  Scripting