> For the complete documentation index, see [llms.txt](https://docs.monolithforensics.com/monolith/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.monolithforensics.com/monolith/using-monolith/monolith-ui-features/query-filter.md).

# Query Filter

Build field-based filters to narrow Monolith tables using dates, text, selections, and AND/OR logic.

The **Query Filter** is used throughout Monolith to narrow tables using field-based conditions.

Filters use conditional logic to return only the records that match the criteria you define. Available fields and filter options depend on the type of records being viewed.

### Example:

<figure><img src="https://2683670198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCD1iskOdIm8E2TpCd9iZ%2Fuploads%2FplcKxQKl70B1n5tT0RAI%2FQuery%20Filter.png?alt=media&amp;token=c8477ea7-4332-4f9e-92a6-1b8649e6d219" alt=""><figcaption></figcaption></figure>

This filter uses **AND** logic, which means a record must match all three conditions to appear in the results.

* Open Date is sometime after January 1, 2023
* The Case Lead is Matt Danner
* The Case Type is Consultation

This filter combines those three conditions into an "exclusive" filter, which means that a record must match all three conditions.  This can also be referred to as an "AND" statement:

<mark style="color:green;">"Show me all cases</mark> \ <mark style="color:green;">**WHERE**</mark> <mark style="color:green;"></mark><mark style="color:green;">the open date is after January 1, 2023</mark> \ <mark style="color:green;">**AND**</mark> <mark style="color:green;"></mark><mark style="color:green;">the case lead is Matt Danner</mark> \ <mark style="color:green;">**AND**</mark> <mark style="color:green;"></mark><mark style="color:green;">the case type is Consultation."</mark>

Available filter fields depend on the type of records being viewed. For example, Cases have different filter options from Evidence Items.

The operators available for each condition also depend on the field type.

Common filter types include:

* Date filters
* Text filters
* Multi-select filters

### Video Walkthrough

{% embed url="<https://www.youtube.com/watch?v=4QuM9crOmoQ>" %}
If the video does not render, [watch the Query Filter walkthrough on YouTube](https://www.youtube.com/watch?v=4QuM9crOmoQ).
{% endembed %}

### Adding a Filter

To add a filter, click on the "Add Filter" button above the table. This opens a searchable list of the fields you can filter on. Start typing to narrow the list to a specific field, or scroll to browse the available options.

<figure><img src="https://2683670198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCD1iskOdIm8E2TpCd9iZ%2Fuploads%2Fk2fTrWHs2ASeADAZnxx9%2FQuery%20Filter%20Dropdown.png?alt=media&amp;token=7b326705-08ce-4315-80a6-695d1c5355a0" alt="An image showing the Add Filter dropdown with a searchable filter dimension and scrollable list of filter options." width="563"><figcaption></figcaption></figure>

Once you select a field, the filter displays an operator between the field and its value. This operator sets the parameters for the condition and changes based on the type of field selected.

The available operators are:

* **Date filters**: is after, is before, is between
* **Text filters**: contains, does not contain, is, is not
* **Multi-select filters**: is any of, is none of

You can add multiple conditions to narrow the data further.

### Filter Persistence

Filters in Monolith are persistent. If you navigate away from a table and return later, Monolith remembers the filters you previously applied.

Filters also carry through to table exports, so exported data reflects the active filters.

If a table appears to be missing records you expect to see, check whether a previous filter is still applied.

### Clearing Filters

To remove an individual filter, click the **X** on that condition.

Removing all conditions returns the table to its unfiltered view.

<figure><img src="https://2683670198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCD1iskOdIm8E2TpCd9iZ%2Fuploads%2FWpGYyKvWHpagSH0j7Aun%2FClear%20Filters.gif?alt=media&amp;token=ccfbbef9-583b-4510-80b5-f80daff3d9f6" alt="Gif showing the user clearing 3 filter sets to return to the default table view"><figcaption></figcaption></figure>

### AND/OR Logic on the Evidence Table

The Evidence Items table supports both **AND** and **OR** logic.

The default is **AND**. Use the filter logic control to switch between the two options.

<figure><img src="https://2683670198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCD1iskOdIm8E2TpCd9iZ%2Fuploads%2FIiWz72MjseDUGqOMUcwZ%2FAND%20OR%20Filter.png?alt=media&amp;token=6ea187fb-8b85-4625-9415-dc605220b264" alt="Screenshot showing the AND/OR filter dropdown" width="563"><figcaption></figcaption></figure>

The two options return different results:

* "AND" returns records that match every condition. A filter for case name and evidence type returns only the evidence items that match both.
* "OR" returns records that match any condition. A filter across two case names returns the evidence items from both cases in a single view.

Here is an example of an "OR" filter on the evidence table:

<figure><img src="https://2683670198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCD1iskOdIm8E2TpCd9iZ%2Fuploads%2Fc2Nj99DKGGkbXpKUrZ4U%2FOR%20Evidence%20Filter%20Example.png?alt=media&amp;token=32cc17b8-f8cb-4136-8657-ab81123b048d" alt="An example OR filter showing a filter for case name is Smith Fraud Case OR case name is Smith Agency"><figcaption></figcaption></figure>

The above filter has two conditions:

* The Case Name is Smith Fraud Case
* The Case Name is Smith Agency

Because the filter uses "OR" logic, a record only needs to match one of the conditions to appear in the results:

<mark style="color:green;">"Show me all evidence items</mark>\ <mark style="color:green;">**WHERE**</mark> <mark style="color:green;"></mark><mark style="color:green;">the case name is Smith Fraud Case</mark>\ <mark style="color:green;">**OR**</mark> <mark style="color:green;"></mark><mark style="color:green;">the case name is Smith Agency."</mark>

{% hint style="info" %}
The selected **AND/OR** logic is persistent along with the filter conditions, so remember to clear or change it when you are finished with that view.
{% endhint %}

### Related Documentation

* [**Monolith UI Features**](/monolith/using-monolith/monolith-ui-features.md)
* [**Tables**](/monolith/using-monolith/monolith-ui-features/tables.md)
* [**Global Search**](/monolith/using-monolith/monolith-ui-features/global-search.md)
