> ## 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 4. Step 7.2: Name of ExtraQuantity column, ExtraQtyTag element

> Distinguish the extra quantity column by creating an ExtraQtyTag Static Text element, so the Quantity column name search can exclude its region later.

You now need to detect the name **Quantity**, which appears on the documents as `Qty`, `Quantity`, `ORDERED`, or `QtyNet`. However, the table contains another name that may also include the word `Quantity`. That name has its own unique text, so first describe the **ExtraQtyTag** element and then exclude it from the search area of the **Quantity** name.

On all the documents, the name of the **ExtraQtyTag** column is exactly the same. Even though the image quality is fairly good, set the maximum error percentage to 35%. For a seven- or eight-letter word, this allows two incorrect characters.

Because all the names are on the same level, specify an additional search constraint relative to the already detected **Designation** column name.

## Create the ExtraQtyTag element

<Steps>
  <Step title="Create the Static Text element">
    In the **TableHeader** element, create a [Static Text](/flexi-capture/fls/template/static-text) element and name it **ExtraQtyTag**.
  </Step>

  <Step title="Enter the search text">
    Click the **Static Text** tab. In the **Search text** field, type `Quantity *BK.ORD`.
  </Step>

  <Step title="Set the maximum error percentage">
    Set **Max error percentage** to 35.
  </Step>

  <Step title="Allow multiple lines">
    Because the **ExtraQuantity** field contains multiple lines, select the **Take spaces into account** and **Permit multiple lines** options.
  </Step>

  <Step title="Set the line break penalty">
    To avoid penalizing hypotheses carried over to the next line, set **Line break penalty** to 1.
  </Step>

  <Step title="Add position relations">
    To place this name on the same level as the **Designation** name, click the **Relations** tab and specify these additional constraints:

    * Above the lower boundary of the **kwDesignation** element, **Offset** = -50, **Reference boundary** = **Bottom**.
    * Below the upper boundary of the **kwDesignation** element, **Offset** = -50, **Reference boundary** = **Top**.

    <Frame>
      <img src="https://mintcdn.com/abbyy/8aWHPAJyzWmTqglX/images/flexi-capture/fls/tutorial4_7_2.png?fit=max&auto=format&n=8aWHPAJyzWmTqglX&q=85&s=54b638096383b76e4f0dbc7e401d1113" alt="Screenshot of the Relations tab of the ExtraQtyTag Static Text element properties in ABBYY FlexiLayout Studio, showing the offset and reference boundary constraints that place the column name on the same level as the kwDesignation element." width="431" height="455" data-path="images/flexi-capture/fls/tutorial4_7_2.png" />
    </Frame>
  </Step>

  <Step title="Add a pre-search condition">
    To optimize the search, do not search for the name if the **Designation** name is not detected. Click the **Advanced** tab and specify this condition in **Advanced pre-search relations**. In the [FlexiLayout language](/flexi-capture/fls/code/general-code):

    ```text theme={null}
    If kwDesignation.IsNull then Dontfind();
    ```
  </Step>

  <Step title="Add whole-word matching">
    In **Advanced pre-search relations**, also specify this constraint:

    ```text theme={null}
    WholeWordMode: true;// Only whole words will be considered as hypotheses
    ```

    <Tip>
      You can also specify this constraint via the GUI by selecting **Whole words only** on the **Static Text** tab.
    </Tip>
  </Step>

  <Step title="Match the FlexiLayout">
    Match the FlexiLayout to confirm that the element is detected on the first page of the document.
  </Step>
</Steps>
