- In the InvoiceHeader element, create an element of type Static Text and name it kwInvoiceNumber.
- Select Required element on the General tab (we have decided to make this element a required element).
- Click the Static Text tab.
- In the Search text field, enter the text to find: “InvoiceNo.|CreditNoteNo”.
- Set Max error percentage to 20.
- Click the Relations tab.
- On the Relations tab, specify that the keywords of the name of the Invoice Number field can only occur below the name of the field Delivery Address:
- Below the element InvoiceHeader.kwDeliveryAddress, Offset = 0.

- Click the Advanced tab.
- Since the Delivery Address field is in the upper third and in the left third of the image, set the following additional search constraint in the Advanced pre-search relations field:
Look for the object in the left third of the image; Look for the object in the upper third of the image. In the FlexiLayout language:
Above: PageRect.Top + PageRect.Height/3;
LeftOf: PageRect.Left + PageRect.Width/3; - Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images.
In practice, if the wording of a field name differs from image to image, you must be sure to specify all the possible variants of the name, or at least the majority of them. You may want to ask for more test images or contact your customer to learn about the possible variants of the name on the documents of this type.
