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

# addTextAttributeFilter()

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

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Creates the AddTextAttributeFilter command. Dispatching this command will result in the addition of a text attribute filter (arbitrary or match) to the dashboard's filter bar, at desired position, or error in case of invalid update (e.g. wrong or duplicated displayForm).

**Signature:**

```typescript
export declare function addTextAttributeFilter(filter: DashboardTextAttributeFilter, index: number, correlationId?: string, mode?: DashboardAttributeFilterConfigMode): IAddTextAttributeFilter;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| filter | [DashboardTextAttributeFilter](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.dashboardtextattributefilter/index.md) | the text attribute filter to add (IDashboardArbitraryAttributeFilter or IDashboardMatchAttributeFilter) |
| index | number | specify index among the attribute filters at which the new filter should be placed. The index starts at zero and there is convenience that index of -1 would add the filter at the end. |
| correlationId | string | _(Optional)_ specify correlation id to use for this command |
| mode | [DashboardAttributeFilterConfigMode](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.dashboardattributefilterconfigmode/index.md) | _(Optional)_ specify the visibility mode of attribute filter |

**Returns:**

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