Invoice Date Extraction in Abbyy Flexicapture

444 Views Asked by At

I have created a group in the flexilayout studio to extract Invoice date. I was able to capture the value using "Date" element however for some invoices I had to capture using "Character String" element. How to provide the condition in the "Output expression" of Block element to check for any one of the values?

1

There are 1 best solutions below

0
Nadia Solovyeva On

The best approach here is to create a new "Region"-type element. Then use the following code:

if (DateElement.IsFound) Then {
  RSA: DateElement.Rect; // if date is found, then set this element region to date region
} else if (CharacterStringElement.IsFound) Then {
  RSA: CharacterStringElement.Rect; // if char string is found, the set its region
} else {
  DontFind; // don't find anything if everything failed
}

After this, you use this region element as a source for your "InvoiceDate" block.