You are viewing limited content. For full access, please sign in.

Question

Question

Quickfields substitute

asked on October 22, 2015

Hi,

We're having trouble with a Quickfields session where Zone OCR is reading an invoice number.

It is supposed to be in the format ABC12345 however quickfields is often reading an 'I' as a '1'. I'm wanting to use Substitute to correct the problem, however I only want to replace any 1's found in the first 3 characters.

So for example A1B98165 would be corrected to AIB98165.

Does anyone have any suggestions?

0 0

Answer

SELECTED ANSWER
replied on October 22, 2015 Show version history

Hi Ronald,

There are a few ways to make this work. One is to add the Substitution process after your ZoneOCR and add 3 substitutions (for the first 3 characters):

 

These substitutions look at each of the first three characters of the Invoice Number %(Zone 1) and change any 1's to I's. The "^" in each pattern marks the start of the Invoice Number, and the ${n} in the replacements preserve the nth group found in the pattern match.

For each substitution, make sure to check the "Replace the input token's value with the result" check box. This allows you to use the ZoneOCR token as you would normally.

Let me know if this works for you!

2 0

Replies

replied on October 22, 2015 Show version history

I'm not sure if anyone else has a more streamline way of doing this but I would first start out in the Pre-Classification Processing by placing your Zone OCR and a pattern match with two tokens.

First pattern match token: Letters - (\w{3})\w{5} to capture the first 3 characters.

Second token: Digits - \w{3}(\w{5}) to capture the last 5.

 

1. First Page Identification: Pattern = \b[1,A-Z]{3}\d{5}

  A. Identification Condition: Pattern match string is not empty

  B. Substitute pre-classification Letters token: pattern 1, replacement I

  C. Assign new token value: %(Substitution)%(Digits)

 

I'm not sure how or where you're using this invoice number but the assign new token value can now be used however you like and it should now be in the correct format.  Let me know if this makes sense/helps.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.