# Verify Table Sort

This is a pre-built action in Avo Assure. This action checks whether the data in a grid is correctly sorted in ascending or descending order based on input, ensuring the grid's data is organized properly.&#x20;

{% hint style="warning" %}
**Note:**&#x20;

* If we pass descending order, and column is sorted in descending order - it will pass
* If we pass descending order, and column is sorted in ascending order or not at all sorted - it will fail.
* If we pass ascending order, and column is sorted in ascending order - it will pass
* If we pass ascending order, and column is sorted in descending order or not at all sorted - it will fail
* If we verify sort for a column which is not visible in the grid - it will fail, and display Column does not present on the screen
* If we verify sort for a column which is not sortable (that means not at all sorted) - It will fail
  {% endhint %}

### Syntax

**Input:** `<Column Header>;<Sort Order>`

<table><thead><tr><th>Argument</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>Column Header value<br>(Required*)</td><td>Column name from the grid that we want to verify. This is case-sensitive.</td><td></td></tr><tr><td>Sort Order<br>(Required*)</td><td>Displays the sorting order: ascending or descending</td><td></td></tr></tbody></table>

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

<figure><img src="/files/5ui3bpVvPnmU6RPN8S4L" alt=""><figcaption></figcaption></figure>

**Example 1**

The **Verify Table Sort** action checks the sorting order of the **Instrument** column. It takes the column name (**Instrument**) and sort order (**ascending**) as inputs and returns **True** if the column is sorted in **descending** order or **False** if it is **not descending**. Use a dynamic variable to display the result.

<figure><img src="/files/2lC5094CvAHbVgoXsivn" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/1xpZHazeVH8hQ45RcDK9" 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/verify-table-sort.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.
