Skip to main content
Kofax

Is it possible to classify documents based on a barcode locator?

8166

QAID # 8166 Published 

Question / Problem:

Is it possible to classify documents based on a barcode locator?

If so, how can I accomplish that?

Answer / Solution:

Yes, it is possible, and can be accomplished through scripting.

Follow the procedures below:

  1. Create a barcode locator on project level (locators on project level will be executed before any classification takes place).
  2. Create a field on project level (e.g. named "Barcode").
  3. Connect the field with the locator.
  4. Add the following code to the project script:
                      Private Sub Document_BeforeClassifyXDoc(pXDoc As CASCADELib.CscXDocument,
                                           bSkip As Boolean)
      Dim BarcodeText As String
      BarcodeText = pXDoc.Fields.ItemByName("Barcode").Text
      If BarcodeText = "12345" Then
         pXDoc.Reclassify "Form12345"
      ElseIf BarcodeText = "678890" Then
         pXDoc.Reclassify "Form678890"
      Else
         ' continue with normal classification
      End If
    End Sub

Applies to:

Product Version Category
AXPRO 3.0 Project Builder