> For the complete documentation index, see [llms.txt](https://docs.ninox.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ninox.com/user-hub/common-tasks/work-with-data/sort-and-group-records-in-a-table.md).

# Sort and group records in a table

Arrange and organize visible records in a table view.

Sort records to bring values into a useful order. Group records with the same field value together. Use both features to scan related records, compare categories, and find information faster.

### Sort records

{% stepper %}
{% step %}

#### Open sorting

Open the table view you want to organize.

Click **Sort** in the table toolbar.

<figure><img src="https://2148310202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBmcFtwhLmWInCVTaddAT%2Fuploads%2Fq8w2yOeADhEJo2S6DQbn%2Ftable%20view_sort_editor_en.png?alt=media&amp;token=d3f7de58-9cbd-463b-bce6-19b167ad5f34" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Choose a field and direction

Select the field to sort by.

Click <i class="fa-arrow-up">:arrow-up:</i> **Ascending** or <i class="fa-arrow-down">:arrow-down:</i> **Descending**.
{% endstep %}
{% endstepper %}

The toolbar shows the name of the field used for sorting. The selected sort field's column header shows <i class="fa-arrow-up">:arrow-up:</i> or <i class="fa-arrow-down">:arrow-down:</i>. Click that column header to change its sort direction.

**Color** fields sort alphabetically by color name. For example, `blue` sorts before `red` in ascending order. **Icon** fields use the same alphabetical ordering by icon name.

### Group records

{% stepper %}
{% step %}

#### Open grouping

Open the table view you want to organize.

Click **Group** in the table toolbar.

<figure><img src="https://2148310202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBmcFtwhLmWInCVTaddAT%2Fuploads%2FDV7YQCmb4W3xFFEN2ddq%2Ftable%20view_group_editor_en.png?alt=media&amp;token=8d141b74-bac9-4866-84ba-906ff3c5b5c4" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Choose a field and direction

Select the field that defines each group.

Ninox groups visible records by that field. You can group by a field even when its column is hidden.

Click <i class="fa-arrow-up">:arrow-up:</i> **Ascending** or <i class="fa-arrow-down">:arrow-down:</i> **Descending** to set the group order.

The toolbar shows the name of the field used for grouping.
{% endstep %}

{% step %}

#### Clear grouping

Click **Clear grouping** to remove grouping.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
For **Rich text** fields, records group together only when content and formatting are identical.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ninox.com/user-hub/common-tasks/work-with-data/sort-and-group-records-in-a-table.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
