How can I pass extracted data from Kofax Capture to Kofax Transformation Modules
Issue
How can I pass extracted data from Kofax Capture to Kofax Transformation Modules (KTM)?
Solution
Getting the XValue object to set its properties, e.g., to write a value of a Kofax Capture CustomStorageString back:
Dim oXValue As CascadeLib.CscXValue Set oXValue = MyObject.XValues.ItemByName("XValue_Key") oXValue.Value = "New content for AC custom storage string" oXValue.MustSynchronize = True
Batch Data
All Batch Field values are accessible read-only from script.
They are saved in the corresponding XValue of the XRootFolder:
XRootFolder.XValues("AC_FIELD_"& BatchFieldName)
If Foldering is activated, the Batch Fields can be mapped with Folder Fields of the XRootFolder. Then the access is read/write during runtime, and when updating the Folder Field of the XRootFolder, the data are written to the mapped Batch Field on Kofax Capture side.
Additionally, the following Batch properties are accessible with read-only access from script:
Name | XRootFolder.XValues("AC_BATCH_NAME") |
Batch Class Name | XRootFolder.XValues("AC_BATCH_CLASS_NAME") |
Priority | XRootFolder.XValues("AC_BATCH_PRIORITY") |
ImageDirectory | XRootFolder.XValues("AC_BATCH_DIRECTORY") |
ExternalBatchID | XRootFolder.XValues("AC_BATCH_EXTERNAL_BATCHID")XRootFolder.XValues("AC_BATCH_GUID") |
BatchGUICreationDateTimeD | XRootFolder.XValues("AC_BATCH_CREATIONDATETIME") |
CreationSiteNameCreation | XRootFolder.XValues("AC_BATCH_CREATIONSITENAME") |
UserID | XRootFolder.XValues("AC_BATCH_CREATIONUSERID") |
Multiple Steps of Validation
If for the Validation, the multiple steps are activated, the information about the next Validation step that is required for validating the Batch can be found in the TM.BatchNextValidationStep CustomStorageString as a one-based number. This information can be used, for example, for Workflow Agents that route the Batches and skip certain Validation steps.
Folder Data
Folder Fields and Folders are only available when foldering is activated in a project. Having foldering activated, one Kofax Capture Folder Class is mapped to one Folder definition on the Kofax Transformation Modules integration side.
During runtime, all Folder Field values of a Folder are accessible read-only from the script.
They are saved in the corresponding XValue of the XFolder object:
XFolder.XValues("AC_FIELD_" & FolderFieldName)
All mapped Folder Fields have read/write access, and by updating the Folder Field of the XFolder, its data are written to the mapped Kofax Capture Folder Field. The initial values of the Folder Fields are read from the mapped Kofax Capture Folder Field.
Additionally, all CustomStorageStrings defined on the Kofax Capture side are transferred to the XValues collection of the XFolder object:
XFolder.XValues("AC_CSS_" & CSSName)
In order to write values back to Kofax Capture, set the MustSynchronize property to TRUE, so that changes in the XValues are transferred to the corresponding CustomStorageString. By using the naming convention and setting the MustSynchronize property, you can also add new XValues to the collection of the XFolder so that new CustomStorageStrings on Kofax Capture side are created.
Document Data
During runtime, all Document Index Field values are accessible read-only from the script. They are saved in the corresponding XValue of the XDocInfo object.
Default values defined in Kofax Capture for Document Index Fields are not filled until the Validation step in the processing queue.
The corresponding XValues remain empty during server processing:
XDocInfo.XValues("AC_FIELD_" & FieldName)
For all mapped Document Index Fields, you have read/write access. By updating the Document field of the XDocInfo.XDocument object, its data is written to the mapped Kofax Capture Document Index Field. Initial field values from Kofax Capture Document Index Fields are not considered.
During runtime, all Table Field values are accessible read-only from the script.
They are saved row-by-row in the XValues of the XDocInfo object. The row number is zero-based, and the columns are separated by [Tab].
See a script example below:
XDocInfo.XValues("AC_TABLE_" & TableFieldName & "_ROW_" & nRowNumber)
Mapped Table Fields have read/write access, and by updating the table of the XDocInfo.XDocument object, its data are written to the mapped Kofax Capture Table Field.
Additionally, all CustomStorageStrings defined on the Kofax Capture side are transferred to the XValues collection of the XDocInfo object:
XDocInfo.XValues("AC_CSS_" & CSSName)
In order to write values back to Kofax Capture, set the MustSynchronize property to TRUE, so that changes in the XValue are transferred to the corresponding Document's CustomStorageString. By using the naming convention and setting the MustSynchronize property, you can also add new XValues to the collection of the XDocInfo so that new CustomStorageStrings on the Kofax Capture side are created.
The Kofax Capture Form Type can be accessed read-only following this naming convention:
XDocInfo.XValues("AC_FORMTYPE")
Level of Complexity
Moderate
Applies to
Product | Version | Build | Environment | Hardware |
---|---|---|---|---|
Kofax Transformation Modules | All |
Article # 3035821