# Get Column Number by Text

This is a pre-built Action located under the captured table element. The functionality of this Action in Avo Assure is to retrieve the column number of the specified header text present in the table based on the input value. The result is stored in the given dynamic variable for further use during test execution

## Syntax

**Input Value**: `<text>`

| Argument                      | Description                                                     |
| ----------------------------- | --------------------------------------------------------------- |
| <p>\<text> <br>(Required)</p> | Provide the text of the table column header you want retrieved. |

**Output Value**: `<Dynamic Variable>;<Dynamic Variable>(Optional)`

| Argument                                 | Description                                                       |
| ---------------------------------------- | ----------------------------------------------------------------- |
| <p>\<Dynamic Variable><br>(Required)</p> | This dynamic variable stores the extracted column number.         |
| <p>\<Dynamic Variable><br>(Optional)</p> | This dynamic variable stores the status as **True** or **False**. |

### **Example: Extracting the Column Number from a Table by Header Text**

In this example, we explain how to retrieve the column number from a table based on the specified column header text.

* **Action**: Get Column Number by Text
* **Input Value**: Requested Date
  * The input value (**Requested Date**) specifies the column header text whose corresponding column number needs to be identified.
* **Output Value**: {Index}
  * The resulting column index (2) is stored in the **{Index}** dynamic variable.
  * If a second output variable is provided, the action returns the status as **True** or **False**:
    * **True**: If the column number is extracted successfully.
    * **False**: If the column number is not extracted successfully.
* **Logical Explanation**: The **Get Column Number by Text** action fetches the column header text from the **Input Value** column (**Requested Date**). It searches the table headers to locate the column matching the provided text and retrieves its index. The index (2) is stored in the **{Index}** variable.

<figure><img src="/files/rKIPiq5QR30btmY2RbHL" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avoautomation.com/avo-assure/actions/web/table-1/get-column-number-by-text.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
