> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/adding-filters.md).

# Adding Filters

This tutorial guides you through the straightforward process of adding field filters to your [Avonni Data Table](/flow/flow-components/data-table.md). Enabling filters gives end-users the power to sort and find the data they need quickly. This guide has you covered, starting with component setup and data source selection, dragging fields into the Datatable, and finally activating filters.

Perfect your Datatable functionality and improve user interaction in just a few easy steps!

{% hint style="info" %}

#### Compare with the native Flow Data Table

Built-in column filters are one of the differences between the Avonni Data Table and Salesforce's standard Flow Data Table. See the [Avonni vs. native Flow Data Table comparison](https://www.avonni.app/product/flow-screen-components/comparison-data-table) for a side-by-side view.
{% endhint %}

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-811e459a406ea225bace574876d6ecf53bb88352%2F2023-03-13_21-15-09.png?alt=media" alt=""><figcaption><p>Final result with filters</p></figcaption></figure>

### **1. Configure the Avonni Datatable component**

* Select the **Datatable component**
* Open the **Component Builder** to access advanced settings

### **2. Select a source collection a data source**

* On the Data Source section, select **`Variable`**
* Select the source collection you want to add fields to your Data Table.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-37e99a7521f709d6ef4d24def6bed9b84b27b8e9%2F2023-03-13_21-09-59.png?alt=media" alt=""><figcaption></figcaption></figure>

### **3. Drag fields on your Data Table**

* From the left panel, drag fields on your Data Table.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-e12e708bec3ccdb82dfa68e3c14a238dcd902d5b%2F2023-03-13_21-12-04%20(1).gif?alt=media" alt=""><figcaption></figcaption></figure>

### **4. Activate filters on selected fields**

* Click on the arrow next to the field name to allow this field to be filterable.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-f15ba1e904b95336a91046b50ff96f259c5426b7%2F2023-03-13_21-14-00.png?alt=media" alt=""><figcaption></figcaption></figure>

### **5. Save and test the Data Table**


---

# 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.avonnicomponents.com/flow/tutorials/components/data-table/adding-filters.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.
