# Filter

<figure><img src="https://3317070279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F21lWxRGfp98mDu2HVXvf%2Fuploads%2FaZttLLdkTLItvJq2fz98%2Fimage.png?alt=media&#x26;token=440a2435-aa99-4c28-a0df-b383d56e9df8" alt=""><figcaption></figcaption></figure>

### 1. filters

```python
{
    "label": "Chain of Custody",
    "icon": "mdi mdi-link-variant",
    "url_name": "grid_chain_of_custody",
    "children": None,
    "allowed_user_groups": [
        "grp-chain-of-custody-rw",
        "grp-chain-of-custody-r",
    ],
    "allowed_users": [],
    "view": controller_views.GridView,
    "view_params": {
        "title": "Chain of Custody",
        "selectpickers_columns": 4,
        "selectpickers": [
            {
                "name": "supplier_id",
                "label": "Factory/Facility Name",
                "category": "filter",
                "live_search": True,
                "action_box": True,
                "multiple": True,
                "queryset": {
                    "model": custom_models.Supplier,
                    "value_field": "id",
                    "label_field": "name",
                },
            },
            ....
        ],
    },
},
```

The parameters in the **selecpickers** are:

* **name:** The field name in the model
* **label:** The label shown in the selectpickers in automail&#x20;
* **category: filter** category
* **multiple:** Whether multiple choices are allowed in the filters
* **queryset:** Provided the model details.
