- In the InvoiceHeader element, create an element of type Group and name it grDate.
- Click the Relations tab.
- Since all the elements used to detect the Invoice Date field may only occur to the right of the keywords of the kwInvoiceDate name and on the same level as the name, set the following search constraints:
- Right of the element kwInvoiceDate, Offset = 0.
- Above the element kwInvoiceDate, Offset = -10, Element boundary = Bottom.
- Below the element kwInvoiceDate, Offset = -10, Element boundary = Top.

- In the
InvoiceHeader.grDateelement, create an element of type Date and name it InvoiceDate. - Click the Date tab.
- On the Date tab, specify all the possible date formats which may occur on the images. Assume that the date format is Day, month, year, the language is English, and there are no other constraints on the date.

- Click the Advanced tab.
-
Since the Invoice Date field is optional on this document but whenever it occurs, it occurs with its name and is always located next to the name, set the following additional search constraint in the Advanced pre-search relations field: Look for the object on the image only if the kwInvoiceDate element has been detected; Look for the image object closest to the kwInvoiceDate element. In the FlexiLayout language:
If InvoiceHeader.kwInvoiceDate.IsNull Then DontFind;
Nearest: InvoiceHeader.kwInvoiceDate; - Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where there is an Invoice Date field.
For more information on finding dates on poor quality images, see Date search after high or low-quality recognition.
-
In the
InvoiceHeader.grDateelement, create an element of type Character String and name it InvoiceDateAsString. - Click the Character String tab.
-
In the Character count field, specify this fuzzy interval:
{-1, 8, 14, INF}, which is an estimate of the string length. Assume that the string may be 8 to 14 characters long. Any hypothesis outside this range will be penalized. - Set the Max space length to 20, which means that the space may be 20 dots long.
- For the other properties, leave the default values.
- Click the Advanced tab.
-
Since the program must look for this element only if the InvoiceDate element has not been detected, set the following additional search constraint in the Advanced pre-search relations field: Look for the object only if the InvoiceDate element has not been detected. In the FlexiLayout language:
If Not InvoiceDate.IsNull Then DontFind; -
Since the Invoice Date field is optional on this document but whenever it occurs, it is always present with its name and located next to the name, set the following additional search constraint in the Advanced pre-search relations field: Look for the object on the image only if the element kwInvoiceDate has been detected; Look for the image object closest to the kwInvoiceDate element. In the FlexiLayout language:
If InvoiceHeader.kwInvoiceDate.IsNull Then DontFind;
Nearest: InvoiceHeader.kwInvoiceDate; - Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where there is an Invoice Date field and generates a null hypothesis for the InvoiceDate element.
-
To describe the location of the InvoiceDate block, select the Source element option, and then click
and select the InvoiceHeader.grDateelement as the source element.
The region of a Group element is calculated by uniting the regions of all the detected subelements.
