> For the complete documentation index, see [llms.txt](https://community-test.logicnets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community-test.logicnets.com/release-9/design-considerations-and-frameworks/frameworks/application-starter-framework/custom-filters.md).

# Custom Filters

## Introduction

The Starter App framework allows you to customize the session grid using filtering buttons based on any of the meta data in the view. These "Hotkeys" can be useful for giving your users the most common filtering settings in one click. You can configure each button to apply a single filter or a set of filters to the listed sessions. You can apply the filter to visible or hidden columns as well as to such standard columns as "Status" or application-specific meta-data columns.

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-e86fc6103182dc20fdabcc9180d436a25d5211fd%2F99548d5d-a66a-4354-9236-62136cc40a48.gif?alt=media)

## Configure Filtering Buttons

The following steps walk you through adding filters.

### Step 1: Add a Button to the *main\_ui* Logicnet in the Starter

Keeping the object the same as for other buttons (the default is "action"), provide a unique value to the button that describes the filter; for example, *filter\_reset* or *filter\_data\_load*.

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-5b853f1e37b018c55acd250f12d498ae2a263df2%2Fda21f5be-1dbc-446f-a68c-04ec168331a0.gif?alt=media)

### Step 2: Add Each Filter Value to the Router in the *main\_panel\_process* Logicnet and Route to a Process Node

The logicnet called *main\_panel\_process* usually controls the new/resume/delete session controls, and you can expand it to deal with the filtering. First, add the values to the possible outputs of the router. Then add a process node to each new route, linking back to the final node in keeping with other process flows in the logicnet (see image below).

*TIP: Your users will most likely want a RESET button to undo any filtering hotkeys, so don't forget that route and filter option in your logicnet.*

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-3176b872fd0e2271cd080ff0dfaa26e78d16c115%2F38bb361b-2721-4072-9a83-ab63a4c3b011.gif?alt=media)

### Step 3: Add *set\_data\_object* Parts to Each Filter Option

Each process node should contain a *set\_data\_object* part that specifies the filter condition. This should be in the following format:

*Path: \[name of filter object]*

*Value: \[column variable from grid] = "\[filtered value]" (this will be added to a SQL SELECT statement within the grid)*

For example, the following *set\_data\_object* part filters to only those records that show a status of "Completed":

*filterStatus*

*status = "Completed"*

You can apply the filtering term across multiple columns, such as col1 = "Red" and col2 = "In Progress". You can also use SQL SELECT terms, including LIKE, IN, BETWEEN \[A] and \[B], as well as the usual mathematical operators.

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-6bfbb7997d857a5f64f1a2bcd051be91eb7ceac7%2Fd404f476-a66c-4977-89ba-532afcd21330.gif?alt=media)

For the RESET filter, this is done exactly the same way, except the process node contains a delete\_object part that removes the filter object from the context.

### Step 4: Add the Filter to the Grid

The final step in the process is to add the filter to the grid part. This is located in the main\_panel\_ui logicnet in the *sessions* node if you are using the default *Starter* project. Add the filter name to the Additional Filters box.

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-46208ed247c05ecc882e5ad74fb797c76313f30e%2F812d939d-77fe-473b-beca-9953fb1578e1.gif?alt=media)

Note that the dbgrid 3 part has many features and options for searching, sorting, and filtering records. The full list of options are detailed in the [dbgrid3 part support](https://support.logicnets.com/kc/logicnets.lns?_=KC\&topic_id=68) article.


---

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://community-test.logicnets.com/release-9/design-considerations-and-frameworks/frameworks/application-starter-framework/custom-filters.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
