# Get Column Number of Input Text

This is a pre-built Action located under the captured grid element. The functionality of this action in Avo Assure is to fetch the column number of the specified input text from the grid. The result is stored in the given dynamic variable for further use during test execution.

## Syntax

**Input Value**: `<text>;<header/body>(optional);<left/right>(optional);<col_attr>(optional)`&#x20;

<table><thead><tr><th>Argument</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>&#x3C;text><br>(Required)</td><td>Provide the text you want to search within the grid.</td><td></td></tr><tr><td><p>&#x3C;header/body></p><p>(Optional)</p></td><td>Provide whether you want to perform the search in the header or body of the grid.</td><td></td></tr><tr><td><p>&#x3C;left/right></p><p>(Optional)</p></td><td>Provide the direction you want to use for searching within the grid.</td><td></td></tr><tr><td>&#x3C;col_attr><br>(Optional)</td><td>Provide any additional column attribute or identifier you want for accurate targeting.</td><td></td></tr></tbody></table>

{% hint style="info" %}
**Note**: If a column attribute name is specified, the action returns the value for that attribute name. If no column attribute name is specified, the action retrieves the column index value.
{% endhint %}

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

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

### **Example 1: Identifying the Column Number Containing a Specific Input Text**

In this example, we are explaining how to identify the column number in a captured grid that contains a specific text value.

* **Action**: Get Column Number of Input Text
* **Input Value**: Loan Type;header
  * The first argument (**Loan Type**) specifies the text to search for in the table.
  * The second argument (**header**) specifies the section of the grid in which the search should be performed.
* **Output Value**: {Column}
  * The column number where the text is found (4) is stored in the **{Column}** dynamic variable.
  * If a second output variable is defined, it stores the action status with the following possible values:
    * **True**: If the column is found successfully.
    * **False**: If the column is not found successfully.
* **Logical Explanation**: The **Get Column Number of Input Text** action reads the details from the **Input Value** column (**Loan Type;header**). It scans the specified header row of the grid and searches for the text Loan Type. After identifying the matching column, the action returns its column number (4) and stores it in the **{Column}** variable.

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

### **Example 2: Identifying the Column Number Containing a Specific Input Text**

In this example, we explain how to identify the column number in a captured table that contains a captured table based on the input text and additional table identifying attributes.

* **Action**: Get Column Number of Input Text
* **Input Value**: Loan Type;header;left
  * The first argument (**Loan Type**) specifies the text to search for in the table.
  * The second argument (**header**) specifies the section of the table in which the search should be performed.
  * The fourth argument (**left**) defines the search direction for locating the cell.
* **Output Value**: {Column}
  * The column number where the text is found (4) is stored in the **{Column}** dynamic variable.
  * If a second output variable is defined, it stores the action status with the following possible values:
    * **True**: If the column is found successfully.
    * **False**: If the column is not found successfully.
* **Logical Explanation**: The **Get Column Number of Input Text** action reads the details from the **Input Value** column (**Loan Type;header;left**). It scans the specified header row of the grid and searches for the text Loan Type. After identifying the matching column, the action returns its column number (4) and stores it in the **{Column}** variable.

<figure><img src="/files/MPSfRBUnTB28XBceQMRy" 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/grid-1/get-column-number-of-input-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.
