> ## 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: Detecting 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.

To describe the element that will be used to look for the keywords in the name of the Total column, take advantage of the fact that the Total column is always located to the right of the Unit Price column.

To create the kwTotal element:

1. In the **TableHeader** element, create an element of type [Static Text](/flexi-capture/fls/template/static-text) and name it **kwTotal**.
2. Click the Static Text tab.
3. In the Search text field, enter the text to find: “**TotalChf**”.
4. Click the Advanced tab.
5. Since the name of the **Total** column is located to the right of the name of the **Unit Price** column (if the latter occurs on the document), set the following [additional search constraint](/flexi-capture/fls/template/advanced-constraints) in the Advanced pre-search relations field: If the **kwUnitPrice** element has been detected, look for the **kwTotal** element to the right of it. In the [FlexiLayout language](/flexi-capture/fls/code/general-code):\
   `If Not (TableHeader.kwUnitPrice.IsNull) Then`\
   `RightOf: TableHeader.kwUnitPrice, 0 * dot;`
6. Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images.
