> ## 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 18: Detect the name of the Total column with a kwTotal element

> Search for the Total column name with a kwTotal Static Text element placed to the right of the Unit Price column in the Sample 3 invoice FlexiLayout.

The **Total** column name always appears to the right of the **Unit Price** column name. Use that fact to describe the element that finds the keywords in the **Total** column name.

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

  <Step title="Enter the search text">
    Click the **Static Text** tab. In the **Search text** field, enter the text to find: `TotalChf`.
  </Step>

  <Step title="Add the search constraint">
    Click the **Advanced** tab. The **Total** column name appears to the right of the **Unit Price** column name (if the latter occurs on the document). In the **Advanced pre-search relations** field, set this [additional search constraint](/flexi-capture/fls/template/advanced-constraints): if the **kwUnitPrice** element was detected, look for the **kwTotal** element to the right of it. In the [FlexiLayout language](/flexi-capture/fls/code/general-code):

    ```text theme={null}
    If Not (TableHeader.kwUnitPrice.IsNull) Then
    RightOf: TableHeader.kwUnitPrice, 0 * dot;
    ```
  </Step>

  <Step title="Verify the match">
    Match the FlexiLayout with the test images and confirm that FlexiLayout Studio detects the element on every image.
  </Step>
</Steps>
