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:
- Create a barcode locator on project level (locators on project level will be executed before any classification takes place).
- Create a field on project level (e.g. named "Barcode").
- Connect the field with the locator.
- 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 |