> For the complete documentation index, see [llms.txt](https://docs.dataloy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dataloy.com/voyage-management-system/step-by-step-guides/sorting-and-filtering-lists.md).

# Sorting and Filtering Lists

In any module with a list, you can apply filtering and sorting to efficiently find information.

## Sorting

Click on the **Sort by**<img src="/files/5ASNXucwbLH7S3ZLUAnh" alt="" data-size="line">button to show the menu of fields by which you can sort. Clicking a field will change the sorting, and a downwards or upwards arrow is displayed next to the field name, indicating ascending or descending sorting order. You can sort a list by multiple fields by adding them in the order you want to sort them.

In some lists, it is possible to sort by column. Those lists will have clickable column names, and a sort direction arrow will be visible next to the column name. You can sort by multiple columns by holding down the shift key while clicking on the column headers.

When sorting calculated fields, the sorting will only consider the fields that are visible in the list.

## Filtering

### Quick filters

Located above the lists, quick filters offer a convenient way to narrow down information.&#x20;

!["Voyages" module quick filters](/files/wUGWpGtnoDjx1ASfHqvo)

1. To activate a filter, click on it and choose one or more values.
2. To remove a specific option from a filter, click the filter button and uncheck the value.
3. To clear all options from a filter, click the **Clear** ![](/files/-M-Eok0Db3ht80D9YV8k) button inside the filter.

### Column filters

Certain list columns have a **Filter** ![](/files/-M-Ecs3ar9kWgcQBulAC) button when hovering the cursor over them. Clicking the button will display a filter for the elements in the column.

### Advanced Filters <img src="/files/rpuHPp5FUX1KWe8ER0EB" alt="" data-size="line">

Narrow any list or grid to exactly the records you need — combine field conditions with AND/OR logic and group them with parentheses. No query language required.

#### Getting started

1. Open a list/grid and click **Advanced Filters**.
2. The builder opens empty. Build it up with:
   * **+ Add Condition** — one field rule (**Field** + **Operator** + **Value**).
   * **{ } Add Group** — a parenthesised group with its own AND/OR logic.
3. A live **Preview** shows the expression as you build. Click **Apply** to run it. (**Clear All** resets, **Cancel** closes.)

#### Operators by field type

The field's type (shown as a tag next to the field name) decides which operators are available:

| Field type                                    | Available operators                                                           |
| --------------------------------------------- | ----------------------------------------------------------------------------- |
| **string**                                    | `=`, `!=`, Contains, StartsWith, EndsWith, In, Null, NotNull                  |
| **number** (double, etc.)                     | `=`, `!=`, `>`, `>=`, `<`, `<=`, Between, In                                  |
| **boolean**                                   | `=`, `!=` (value is True / False)                                             |
| **date**                                      | On, After, On or after, Before, On or before, Between, Is empty, Is not empty |
| **object** (a list/collection, e.g. `cargos`) | Empty, Not Empty                                                              |

#### What to keep in mind

* **AND narrows, OR widens.** Be mindful when mixing them - use **Add Group** to make the intent clear, e.g. `vessel = X AND (status = ACTIVE OR status = PENDING)`. If results look wrong, check your grouping first.
* **Drag to reorder** conditions and groups (Escape cancels a drag).
* **Collection fields filter on presence, not value.** Picking an `object` field (like `cargos`) only offers Empty / Not Empty - testing whether the array has any items (preview shows `cargos[] = Empty`).

#### Saving

Filter state (including dynamic tokens) is preserved in the view config. Reopening a saved view reapplies the same logic with dynamic values freshly resolved.


---

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

```
GET https://docs.dataloy.com/voyage-management-system/step-by-step-guides/sorting-and-filtering-lists.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.
