> For the complete documentation index, see [llms.txt](https://docs.chainargos.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chainargos.com/documentation/concepts/filters/customizing-filters.md).

# Customizing Filters

Custom filters let you write the fields, constants, functions, and operators for your desired filtering.&#x20;

ChainArgos also lets you build an expression that evaluates as `TRUE` or `FALSE`. When you run the query, ChainArgos only returns rows for which that condition is `TRUE`.

The `AND/OR` filters enables you to group and use `AND/OR` filter logic without having to manually create filter expressions.

### To get `OR` Logic

Type multiple conditions into the same filter, separated by commas. For example, `today, 7 days ago` means "today or 7 days ago".

### To get `AND` Logic

Type your conditions, one by one, into multiple time filters.&#x20;

For example, you could:

1. put into a "Block Times" **Block Written Date -> is on or after -> (absolute) -> 2018/01/01** filter;
2. then put "Block Times" **Block Written Date -> is on before -> (relative) -> 2 days** filter.&#x20;
3. This would mean "January 1st, 2018 and after, **AND** before 2 days ago".

<figure><img src="/files/BE9xOa3JrElup8GmiTui" alt=""><figcaption></figcaption></figure>

### `AND` / `OR` Logic Combinations

`AND` / `OR` logic can be used to create sophisticated filters to zoom in on a specific data set.&#x20;

By clicking on the `AND` button, you can easily switch the operator to `OR`, and add additional filters to create a sophisticated series of `AND` / `OR` operators.&#x20;

<figure><img src="/files/P3MmI4sIcyKLPFO25vCT" alt=""><figcaption><p>Click on the "AND" button to toggle between "<code>AND</code>" or "<code>OR</code>".</p></figcaption></figure>

Be careful the logic you use for multiple filters does not contradict, otherwise you may get conflicting results, or possibly none at all.&#x20;


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.chainargos.com/documentation/concepts/filters/customizing-filters.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
