> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sample 3. Step 13: Further analysis of the images

> Map out the remaining invoice elements in Sample 3: table header and footer detection strategy, column name elements, and the Footer group plan.

So far, you have described the Invoice Number, Invoice Date, and Delivery Address fields. Now decide the order in which to detect the other elements.

To detect the Country field, you can use the field name and a [Character String](/flexi-capture/fls/template/character-chain) element.

To detect the Total Quantity and Total Amount fields, you need more than the name that the two fields share. The names of the corresponding table columns help here.

## Plan the search for the Invoice Table field

Prepare to search for the Invoice Table field, which a [Table](/flexi-capture/fls/tables/general-tables) element detects.

1. **Describe the header of the table.** You can detect column names in two ways:

   * Specify one or more keywords in the **Column Properties** dialog box (open the **Table** element's **Properties** dialog box and click the **Columns** tab). This method is quick but not very flexible.
   * Use a previously detected element as a reference to find the column name's location. This method takes full advantage of the additional element settings.

   The pre-recognition quality is good enough to use the first method. The one difficulty is the very short name of the **Quantity** column. Because the keyword `Qty` has only three letters, a 20% error tolerance effectively allows no errors.

   Use the first method for the first two columns, **Reference** and **Designation**, and use previously described elements for the rest: **Quantity**, **Unit Price**, and **Total**. You must create these elements anyway to detect the **Total Quantity** and **Total Amount** fields.
2. **Describe the footer of the table.** You can describe it with keywords or with an auxiliary element. On some images the footer keywords also occur in the first table row, so use an auxiliary element to restrict the search area.
3. **Describe the table search area.** After describing the header and footer, describe the right boundary of the table. The left boundary needs no description, because there is no other data on that part of the image. Context cannot separate the figures in the **Total** column from those in the **Sales** column, so use the name of the last column, **Sales**, to restrict the search area on the right.

<Note>
  The elements and the order in which they are detected are selected by trial and error, and you can change them during FlexiLayout adjustment.
</Note>

## Describe the auxiliary elements

Before describing the remaining fields, describe the auxiliary elements. The names of the **Quantity**, **Unit Price**, **Total**, and **Sales** columns must be detected first.

The table header begins with a horizontal separator between the column names and the **Invoice Number**, **Invoice Date**, and **Delivery Address** fields. This separator helps restrict the search areas of the column names. Create a [Separator](/flexi-capture/fls/template/separator) element and name it **hsTableHeaderTop**. For more information, see [Step 14](/flexi-capture/fls/tutorial3/3step14).

Next, look for the column names in their natural order. Create a [Group](/flexi-capture/fls/template/elements-compound) element named **TableHeader** (see [Step 15](/flexi-capture/fls/tutorial3/3step15)) that includes these elements:

| Element         | Type                                                   | Corresponds to column | Described in                                    |
| :-------------- | :----------------------------------------------------- | :-------------------- | :---------------------------------------------- |
| **kwQuantity**  | [Static Text](/flexi-capture/fls/template/static-text) | **Quantity**          | [Step 16](/flexi-capture/fls/tutorial3/3step16) |
| **kwUnitPrice** | [Static Text](/flexi-capture/fls/template/static-text) | **Unit Price**        | [Step 17](/flexi-capture/fls/tutorial3/3step17) |
| **kwTotal**     | [Static Text](/flexi-capture/fls/template/static-text) | **Total**             | [Step 18](/flexi-capture/fls/tutorial3/3step18) |
| **kwSales**     | [Static Text](/flexi-capture/fls/template/static-text) | **Sales**             | [Step 19](/flexi-capture/fls/tutorial3/3step19) |

Then describe the lower part of the document: the shared name of the **Total Quantity** and **Total Amount** fields, which marks the bottom boundary of the table, and any captions that help locate that boundary. Describe the name element and the source element for the **Country** field in this group too.

Create a [Group](/flexi-capture/fls/template/elements-compound) element named **Footer** that includes these elements:

| Element      | Type                                                            | Corresponds to                                                 | Described in                                    |
| :----------- | :-------------------------------------------------------------- | :------------------------------------------------------------- | :---------------------------------------------- |
| **kwFooter** | [Static Text](/flexi-capture/fls/template/static-text)          | The footer of the **Invoice Table**                            | [Step 21](/flexi-capture/fls/tutorial3/3step21) |
| **kwTotal**  | [Static Text](/flexi-capture/fls/template/static-text)          | The name of the **Total Quantity** and **Total Amount** fields | [Step 22](/flexi-capture/fls/tutorial3/3step22) |
| **kwOrigin** | [Static Text](/flexi-capture/fls/template/static-text)          | The name of the **Country** field                              | [Step 23](/flexi-capture/fls/tutorial3/3step23) |
| **Country**  | [Character String](/flexi-capture/fls/template/character-chain) | The **Country** field                                          | [Step 24](/flexi-capture/fls/tutorial3/3step24) |

## Describe the remaining fields

With the preparations done and the creation order decided, look for the remaining fields, using the column names and the **Footer** you already detected:

* Create two [Character String](/flexi-capture/fls/template/character-chain) elements named **TotalQuantity** and **TotalAmount** for the **Total Quantity** and **Total Amount** fields. For more information, see [Step 25](/flexi-capture/fls/tutorial3/3step25).
* Create a [Table](/flexi-capture/fls/tables/general-tables) element named **InvoiceTable** for the **Invoice Table** field. For more information, see [Step 26](/flexi-capture/fls/tutorial3/3step26).
