# Choose values from a list

This filter lets users choose from distinct, recurring values such as regions or statuses. It presents the available choices more clearly than a Text filter that matches part of a name.

Canonical: https://grid.syidax.com/docs/features/set-filter/

<a id="understand"></a>

## How it works and when to use it

The distinct-value list and the full filtered data scope are separate. With remote data, decide in your data provider whether to include values that have not loaded yet.

Using this feature in a product requires the Pro package and a valid license. Matching setting names do not enable Pro features in Community.

In the code, grid is the Grid element prepared in the installation chapter. Check each example's data and settings, and implement the app functions and server endpoints for your project.

- [Installation and integration · Shared sample data](https://grid.syidax.com/docs/guides/getting-started.md)

<a id="example-1"></a>

## Example 1. Region selection list

Declare a Set filter on the region column and display its filter UI.

```javascript
grid.headerFilterRow = true;
grid.columnDefs = grid.columnDefs.map(col => col.field === 'region' ? { ...col, filter: 'set' } : col);
```

Verify the result: Select values by region. Check whether empty values and whitespace-only strings should be treated as the same value.

<a id="example-2"></a>

## Example 2. Restore frequently used selections

Save and restore a model in which the user selected APAC and EMEA.

```javascript
const saved = await grid.getFilterModel();
console.log(saved);
await grid.setFilterModel(saved);
```

Verify the result: Restore the selection after preparing the same columns and data structure. Selecting all values and selecting none can have different meanings.

<a id="example-3"></a>

## Example 3. Data with changing list values

When regions are added or removed, compare the saved selection with the current value list. Check whether selecting values that no longer exist is causing empty results.

Verify the result: This helps explain why users see no results. Consistently decide in your app whether to clear or retain selections after data updates.

<a id="pitfalls"></a>

## Combining features and troubleshooting

Set filter checkboxes and rowSelection checkboxes are separate. Filter checks choose what is displayed; row checks choose targets for operations.

For server filtering, the server must interpret conditions with the same string and empty-value rules to return consistent counts.

<a id="related-api"></a>

## APIs used by this feature

- [filter](https://grid.syidax.com/docs/columns/filter.md) — Built-in filter type or custom filter definition for this column.

<a id="next"></a>

## Related reading

- [How rows, columns, and IDs relate](https://grid.syidax.com/docs/guides/concepts.md)
- [Connect results and events](https://grid.syidax.com/docs/guides/data-event-access.md)
- [Explore in Features](https://grid.syidax.com/grid/set-filter) — The guide describes which interactions are available to try.
