# Filters

Filters allow you to restrict events and lists to certain circumstances or objects. These are very useful in regulating when or how many times some code is run.

When utilised correctly, filters often replace if statements just under loops or events, allowing one to remove a line and decrease indentation!

{% hint style="info" %}
See the [Never Nesting page](/syntask/organisation/never-nesting.md) to learn why lots of indentation can be messy.
{% endhint %}


---

# 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://x8ight.gitbook.io/syntask/limiters/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.
