---
title: FilterPreset
product: Form Library
api-type: class
description: A saved filter that users can select in the Filter control.
source: https://surveyjs.io/form-library/documentation/api-reference/filterpreset
source: https://surveyjs.io/form-library/documentation/api-reference/filterpreset
---

# `FilterPreset`

A saved filter that users can select in the Filter control.

Define filter presets in the control's [`presets`](https://surveyjs.io/form-library/documentation/api-reference/questionfiltermodel#presets) array. The following example defines an **Under $20** preset for a Dynamic Matrix named `products` with a numeric `price` column:

```json
{
  "type": "filter",
  "name": "productFilter",
  "targetQuestion": "products",
  "presets": [
    {
      "name": "under20",
      "title": "Under $20",
      "expression": "{price} < 20"
    }
  ]
}
```

## Inheritance

[`Base`](https://surveyjs.io/form-library/documentation/api-reference/base.md) &rarr; `FilterPreset`

## Properties

### `allowDelete`

**Type**: `boolean`

Specifies whether users can delete this survey-defined preset. Applies when [`showPresets`](https://surveyjs.io/form-library/documentation/api-reference/questionfiltermodel#showPresets) is `true`. User-created presets can be deleted regardless of this setting.

Default value: `undefined` (inherits the Filter control's [`allowDeletePresets`](https://surveyjs.io/form-library/documentation/api-reference/questionfiltermodel#allowDeletePresets) setting)

### `allowEdit`

**Type**: `boolean`

Specifies whether users can edit this survey-defined preset. Applies when [`showPresets`](https://surveyjs.io/form-library/documentation/api-reference/questionfiltermodel#showPresets) is `true`. User-created presets can be edited regardless of this setting.

Default value: `undefined` (inherits the Filter control's [`allowEditPresets`](https://surveyjs.io/form-library/documentation/api-reference/questionfiltermodel#allowEditPresets) setting)

### `expression`

**Type**: `string`

The [filter expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) that determines which records match this preset.

### `name`

**Type**: `string`

A unique name that identifies this preset within the Filter control.

Set the control's [`defaultPreset`](https://surveyjs.io/form-library/documentation/api-reference/questionfiltermodel#defaultPreset) to this name to apply the preset at startup.

### `title`

**Type**: `string`

The localizable label users see for this preset in the Filter control.

If you leave this property empty, the label defaults to the preset's [`name`](#name).
