> For the complete documentation index, see [llms.txt](https://docs.avoautomation.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avoautomation.com/avo-assure/actions/grid/get-total-column-count.md).

# 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

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

<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:**

<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="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2Fyvu3jRRKNZWTVpuhdAjc%2Fimage.png?alt=media&amp;token=1126d99d-6d6d-49da-8837-a4cfd18cceac" 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="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FeE9xro7Xfe67VWzXYOOz%2Fimage.png?alt=media&amp;token=84dab74e-4004-41c3-8ffe-aa49116e912b" 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="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FcG03U8fVOBQILcLv6pdr%2Fimage.png?alt=media&amp;token=d8d4b363-8359-4d05-bdd7-abbffcd9f9ca" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avoautomation.com/avo-assure/actions/grid/get-total-column-count.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
