Skip to main content
Kofax

How to set Capture batch field from KTM script

Article # 3038254 - Page views: 49

Issue

I want to set a Capture batch field from within the KTM script. I have tried using this code but the batch field VariationID does not get updated when I look at the properties of the batch after KTM Validation. What am I doing wrong here?

Private Sub Batch_Close(ByVal pXRootFolder As CASCADELib.CscXFolder, ByVal CloseMode As CASCADELib.CscBatchCloseMode)
    pXRootFolder.XValues.ItemByName("AC_FIELD_VariationID").Value = "593"
End Sub

 

Solution

Using XValues to work with index/batch fields is for read-only access only, so to et the values from KC into KTM environment. If you want to set the values back to KC, you need to do it via KTM fields and synchronization. To be able to set batch fields, you need to enable foldering in Project Settings. Then create a field in Project Folder and then when you synchronize the KTM project to KC batch class, there will additional two tabs related to folder synchronization, which allow you to synchronize KTM Project Folder fields into KC batch class batch fields.

See https://docshield.kofax.com/KTM/en_U...derFields.html

In case you do not want to see the folder in Validation Form, you can set that field to be Always valid, then right click the Project Folder and select Customize Folder Validation Form and remove all the elements from folder validation form. Then the tab will not ne displayed.

 

Level of Complexity 

Moderate

 

Applies to  

Product Version Build Environment Hardware
Kofax Transformation Modules All      

References

Add any references to other internal or external articles

 

Article # 3038254
  • Was this article helpful?