# Filter

The Filter portlet allows for customized filter lists and buttons to apply towards other portlets. With this portlet, one can choose from a pre-configured list of values or manually type in a value to send a filter request with the chosen criteria.&#x20;

## General

General data is required for all portlets.

[General configuration](https://help.novacuraflow.com/development/flow-portal-2/common-configuration#general)

## Listeners

The portlet can send the following events:

* OnFilter
* OnRowSelection

<div align="left"><img src="https://529897662-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M8tbrSaGIRYe9EthohB%2F-M8tdRnj9ObMtluZAUDr%2Fimage.png?alt=media&#x26;token=a649c3f4-351d-4921-bd61-8181b09bc40f" alt=""></div>

[Listeners configuration](https://help.novacuraflow.com/development/flow-portal-2/common-configuration#listeners)

## Settings

Order - Set if the filter should be displayed horizontally or vertically.

Send Filter command on Clear - if checked the values in the Filter portlet will be cleared followed by a Filter command sent to all listening portlets. If the box is left un-checked the Filter portlets values will be cleared but no command will be sent to the listening portlets.

<div align="left"><figure><img src="https://529897662-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LtPTgZOYmpJka4jqs1v-3406065915%2Fuploads%2FmJOoWB57GVtkpSx4GuFc%2FFilter%20settings.png?alt=media&#x26;token=29e9d177-a7bf-4474-a39d-176d724a79be" alt=""><figcaption></figcaption></figure></div>

## Filters

Click *New* to add a new filter.

* Name: the text displayed above the filter drop down box

* Parameter: the column or variable name the filter will look for in the listen portlet

* Edit as: the type of filter

  * text: type in free text
  * number: filter for integer number
  * decimal: filter with configurable number of decimals
  * date: fill in date to filter
  * date & time: filters on date and time
  * list of values: gives a drop-down list of values. Select a value to filter
  * checkbox: filters on boolean values

* List of values: the list of values which is to be used (only available when *Edit as* is set to "list of values")

* Precision: number of decimals in the filter (only used for Decimal filter)

* Operator: for each input type specific operators are available

| Type of filter                       | Supported operators                                                                                |
| ------------------------------------ | -------------------------------------------------------------------------------------------------- |
| Text                                 | equals, not equals, contains, starts with, ends with                                               |
| Number, Decimal, Date, Date and Time | equals, not equals, is greater than, is less than, is greater than or equal, is less than or equal |
| List of values, Checkbox             | equals                                                                                             |

<div align="left"><img src="https://529897662-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M0YpPNWSiEcngpjqBAD%2F-M0YptDmRghXWeOd2hEa%2Fimage.png?alt=media&#x26;token=63968292-b2ae-496b-91de-0cfabdf75a56" alt=""></div>

Below is an example of number, text, and list of value filters in use. Note that the filtered columns are indicated in blue in the column header. In case of filtering same column more than once, last value will always be applied.

![](https://529897662-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-M0YPAag5UmIU7KcBcsb%2F-M0YPHmMCeAWyxxTSV72%2FFilter.gif?alt=media\&token=09f528d6-cf8c-4e3a-a8b0-c26cef58fbd1)

## Style

Change the header text color and add a header stripe by configuring style.

[Style configuration](https://help.novacuraflow.com/development/flow-portal-2/common-configuration#style)
