# Get Total Column Count

This is pre-built Action located under the Table/Grid captured from the AUT Element Name,  instructs Avo Assure to fetch the total column count present in grid, and save the result in the dynamic variable.

{% hint style="warning" %}
***Note: User should pass Visible as command in input value to find the hidden elements.***&#x20;

* For Grid, total column count should give value of visible column count.
* For visible column it will pass if column is displayed.
* For invisible column, it will fail if column is not displayed,
* get row/column with text, should give the column/row value based on visibility of the number of columns are visible in the grid.  \
  Some examples for hidden elements  \
  It will affect all the grid keywords where we have column dependency
  {% endhint %}

### Syntax                                            &#x20;

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

<table><thead><tr><th>Argument</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td><p>&#x3C;header/body></p><p>(optional)</p></td><td><strong>&#x3C;header/body></strong><br>This part specifies the section of the table where the column count should be taken.<br>1. <strong>header</strong> → Count columns in the table header <strong>(header;left/right)</strong><br>2. <strong>body</strong> → Count columns in the table body<br><strong>(body;left/right)</strong></td><td></td></tr><tr><td><p>&#x3C;left/right></p><p>(optional)</p></td><td>Specifies whether to count columns only in the left-fixed or right-fixed section of the table.<br>1. <strong>left</strong> → Counts only the columns fixed on the left side.<br>2. <strong>right</strong> → Counts only the columns fixed on the right side.</td><td></td></tr><tr><td>Input - N/A</td><td>If input is not specified it will count all visible columns from the grid or table.</td><td></td></tr></tbody></table>

**Output Value:**&#x20;

<table><thead><tr><th>Argument</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>&#x3C;Dynamic Variable><br>(Optional)</td><td>This variable stores the Column count of grid or table</td><td></td></tr><tr><td>&#x3C;Dynamic Variable><br>(Optional)</td><td>This variable holds the results in <strong>True</strong> and <strong>False</strong></td><td></td></tr></tbody></table>

**Example** **1**

**Retrieve and Store Column Count from a Specific Grid Section**

The **Get Total Column Count** action takes an input value in the format **(header;left)** returns the number of columns in the specified section of the grid, stores the result in the **{TotalColumnCount}** variable, and stores the execution status in the **{Status}** variable.

* **True** – if the count is retrieved successfully
* **False** – if the action fails or an error occurs

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

**Example 2**

**Get the total number of columns from the table (Input value - N/A)**\
The **Get Total Column Count** action retrieves the total number of columns present in the set table. The result is stored in the **{TotalColumnCount}** variable, and the action status is saved in the **{Status}** variable with the following possible values:

* **True** – if the count is retrieved successfully
* **False** – if the action fails or an error occurs

<figure><img src="/files/UpINfsFFm3cTkerBGwFj" 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/get-total-column-count.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.
