# Get Total Column Count

This is a pre-built action in Avo Assure and comes under **@Grid element**, instructs Avo Assure to fetch the total column count present in grid, and save the result in the dynamic variable.

### Syntax                                            &#x20;

**Input Value:** `<header/body>(optional);<left/right>(optional);visible(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>visible<br>(optional)</td><td>It is case-sensitive and provides the total column count on the <strong>current page</strong> of the specified grid or table</td><td></td></tr><tr><td>Input - N/A</td><td>If the input is not specified, it will provide the total column count from <strong>all the pages</strong> of 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/2kItnXbRGGT02DoHv079" alt=""><figcaption></figcaption></figure>

**Example** 3

**Retrieve visible Column Count from a Specific Grid Section**

The **Get Total Column Count** action takes an input value in the format **(visible)** and returns the total number of columns present in the current page 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/zshY0U9S1KLtDKIcBIdL" 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/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.
