# Global Filters

Use global filters to work with a specific subset of data within a collection. These filters apply to all queries for a given collection.

## Applying a Global Filter

Configure global filters in the [Collections](/umbraco-ui-builder/collections/overview.md) settings.

### Using the `SetFilter()` Method

Defines a filter using a **where clause** expression. The expression must return a `boolean` value.

#### Method Syntax

```cs
SetFilter(Lambda whereClauseExpression) : CollectionConfigBuilder<TEntityType>
```

#### Example

```csharp
collectionConfig.SetFilter(p => p.Current);
```


---

# 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.umbraco.com/umbraco-ui-builder/filtering/global-filters.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.
