# User Grid - Data Filtering

GridMate provides two methods for filtering the data: The **Advanced Filter** allows you to create more complex and intricate filters, while the **Quick Filter** provides an easy way to explore the grid without delving deeper into the conditions.

## Quick Filter&#x20;

GridMate provides flexible **Quick Filter** tools similar to the one provided by Salesforce standard UI. The filter is dynamic based on the filed type:

* **Lookup Picker** for lookup fields.
* **Range** for dates, date times, currencies, percentages and other number fields.
* **Multiple Choice** for PickList and Multi-Picklist fields.
* **Radio Button** for checkbox fields.
* **Multiple Entries** for text fields.

The video below is a step-by-step tutorial to learn how to use the **Quick Filtering**👇.

{% embed url="<https://youtu.be/hSAuRkBYBD8>" %}
Quick Filter
{% endembed %}

## Advanced Filter&#x20;

GridMate offers flexible and powerful **Query Builder.** Using this tool, the end user will be able to build advanced filters including:

* **Simple Condition** : a basic condition to apply on a single field using an operator (<, >, =,...) and optionally a value to compare with.
* **Complex Condition**: an OR/AND junction that involves multiple single or complex conditions. With this formalism, we can express any logical condition.
* **Cross Filters**: a condition to check the existence or not of an child record. A Cross Filter could also expressed using simple condition to filter the child records.

The video below is a step-by-step tutorial to learn how to use the **Advanced Filtering**👇.

{% hint style="info" %}
The quick filters are automatically converted into an advanced filter. Remember that you can upgrade the quick filter to an advanced filter, But the inverse process is not allowed.
{% endhint %}

{% embed url="<https://youtu.be/kWq4V823l_Y>" %}
Advanced Filter
{% endembed %}

Behind the scene, the Query Builder produces a **JSON** like filter used by GridMate components. Below is the produced configuration for the tutorial above.

```json
{
    "and": [
        {
            "StageName": {
                "operator": "in",
                "value": "('Prospecting','Qualification','Needs Analysis','Proposal/Price Quote')"
            }
        },
        {
            "or": [
                {
                    "Amount": {
                        "operator": ">=",
                        "value": "5000"
                    }
                },
                {
                    "CloseDate": {
                        "operator": "=",
                        "value": "THIS_YEAR"
                    }
                }
            ]
        },
        {
            "with OpportunityContactRoles": {
                "operator": "with",
                "field": "OpportunityId",
                "childSObject": "OpportunityContactRole",
                "value": {}
            }
        }
    ]
}
```


---

# 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.gridmate.io/advanced-guides/user-grid-data-filtering.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.
