Custom Panel to separate docs by barcode using RegEx?

Custom Panel to separate docs by barcode using RegEx?

Postby sanderson82 » Mon Jun 25, 2012 9:12 am

Based on a previous thread of mine
http://forums.kofax.com/viewtopic.php?f=65&t=18244

The functionality i need is in KC10 however the current KC9 environment is shared by multiple customers so upgrading is going to take sone time.

Would it be possible to add a custom panel in KC9 to separate docs by a barcode that has been validated against a RegEx?

Or if not possible, use standard barcode separator to separate on any barcode, then validate each doc against regex and join pages to previous doc where the barcode does not validate?


If so could someone give an example of how this could be achieved?

Regards

Steven
sanderson82
Participant
 
Posts: 127
Joined: Tue May 25, 2010 10:36 am

Re: Custom Panel to separate docs by barcode using RegEx?

Postby sanderson82 » Mon Jun 25, 2012 1:45 pm

Update...

I'm also interested to know if this could be achieved this using a separator zone and Recognition script.

I've made the separator zone the full size of my sample page, and added the following code to the recog script...but without much success. Not all docs are separated correctly and the field values are not passed through to validation

Code: Select all
REM ========================================================================
REM Function handling recognition after Kofax recognition
REM ------------------------------------------------------------------------

Dim oRegEx As Object
Dim oMatches As Object

Function KfxPostRecognition As Integer
   On Error GoTo Failure

   ' Insert user recognition engine here if you want it to be executed
   ' after the Kofax recognition engine.
   
   Set oRegEx = CreateObject("VBScript.RegExp")
   oRegEx.IgnoreCase = False
   oRegEx.Global = True
   oRegEx.Pattern = "^(AT|EF|B5|C7|DK|DX|EG|EH|EP|HE|J6|NA|RB|SD|YB|ZA|GW|ED|EW|EB)(0[1-9]|1[012])(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])\d{4}$"
   Set oMatches = oRegEx.Execute(KfxValue)

   If oMatches.Count > 0 Then
      KfxValue = oMatches(0).Value
      KfxConfidence = 100
      KfxPostRecognition = SaveAndSkipOperation
   End If
 
   Exit Function

Failure:
   KfxPostRecognition = FatalError
   Exit Function
End Function
sanderson82
Participant
 
Posts: 127
Joined: Tue May 25, 2010 10:36 am


Return to Custom Modules General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests