0

The batch priority can be accessed in KTM using the batch XValue (AC_BATCH_PRIORITY) but I can't seem this is a read/Only field. I have searched KTM wiki but couldn't find any example which shows if this can be done.

Please advise if this is possible, if yes then if you could share an example that'll be great.

Maverick
  • 1,396
  • 5
  • 22
  • 42

2 Answers2

2

The batch priority should be read/write, at least according to the documentation: https://docshield.kofax.com/KTM/en_US/6.3.0-v15o2fs281/help/SCRIPT/ScriptDocumentation/c_BatchData.html?h=priority

Make sure to use the .Set method on XRootFolder.XValues.ItemByName ("AC_BATCH_PRIORITY"). If you attempt to change it by using the .Value property, MustSave may default to False, resulting in the updated value to be lost.

Wolfgang Radl
  • 2,319
  • 2
  • 17
  • 22
0

I've got a button to change priority from within validation like this

    Private Sub ValidationForm_ButtonClicked(ByVal ButtonName As String, ByVal pXDoc As CASCADELib.CscXDocument)
        Select Case ButtonName
            Case "PriorityDown"
                pXDoc.GetRootFolder().XValues.Set("AC_BATCH_PRIORITY","6")
            Case "PriorityUp"
                pXDoc.GetRootFolder().XValues.Set("AC_BATCH_PRIORITY","4")
        End Select
    End Sub

Ardox
  • 1