- In the InvoiceHeader element, create an element of type Character String and name it InvoiceNumber.
- Click the Character String tab.
- Set the Percentage of non-alphabet characters to 100%, which means that there is no restriction for characters.
-
In the Character count field, specify this fuzzy interval:
{-1, 3, 20, INF}, which restricts the number of characters in the string. Assume that the possible values range from 3 to 20. Any hypotheses outside this range will be penalized. - Click the Relations tab.
-
Since InvoiceNumber can only occur to the right of the keywords of the name kwInvoiceNumber, but no farther than 550 dots from the right boundary of the name kwInvoiceNumber, set the following search constraints:
- Right of the element kwInvoiceNumber, Offset = 0
- Left of the element kwInvoiceNumber, Offset = -550, Reference boundary = Right
Offset values are selected by trial and error. -
Since InvoiceNumber is always located on the same level as the keyword of the name kwInvoiceNumber, set the following search constraints:
- Above the element kwInvoiceNumber, Offset = -10, Reference boundary = Bottom
- Below the element kwInvoiceNumber, Offset = -10, Reference boundary = Top

- Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.
-
To describe the location of the InvoiceNumber block, click its Properties and select the Source element option, and then click
and select the InvoiceNumber element as the source element.
Sample 3
Sample 3. Step 8: Describing the Invoice Number field with an InvoiceNumber element
Step 8 of FlexiLayout Studio Sample 3: describe the Invoice Number field with a Character String element, fuzzy character counts, and relation constraints.
The field Invoice Number is to the right of the name and is located on the same horizontal level. Analysis of the test images reveals that on some of the images the number has been poorly recognized. So do not restrict the alphabet. Instead, restrict the search area and restrict the length of the string to 3-20 characters.
To create the InvoiceNumber element:
Sample 3. Step 7: Detecting the name of the Invoice Date field with a kwInvoiceDate element
Previous
Sample 3. Step 9: Describing the Invoice Date field with grDate, InvoiceDate, and InvoiceDateAsString elements
Next
