> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# setFilterViewAsDefault()

- Package: [@gooddata/sdk-ui-dashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/index.md)
- Kind: function
- Stability: alpha
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-dashboard/src/model/commands/filters.ts

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Creates the [ISetFilterViewAsDefault](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.isetfilterviewasdefault/index.md) command.

**Signature:**

```typescript
export declare function setFilterViewAsDefault(ref: ObjRef, isDefault: boolean, correlationId?: string): ISetFilterViewAsDefault;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| ref | [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) | ref of the filter view that must be set as a default one. |
| isDefault | boolean | determine if filter view identified by the provided ref should be marked as a default one. If yes, any existing filter view for the same user and dashboard will be marked as non default as only one can be set as default at the same time. |
| correlationId | string | _(Optional)_ specify correlation id. It will be included in all events that will be emitted during the command processing. |

**Returns:**

[ISetFilterViewAsDefault](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.isetfilterviewasdefault/index.md)

delete filter view command

## Remarks

Dispatching this command will result into setting of the persisted filter view as a default one when dashboard filter context is loaded or unsetting it from being applied automatically on load.
