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

# newArbitraryAttributeFilter()

- Package: [@gooddata/sdk-model](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/index.md)
- Kind: function
- Stability: alpha
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-model/src/execution/filter/factory.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 a new arbitrary attribute filter.

**Signature:**

```typescript
export declare function newArbitraryAttributeFilter(attributeOrRef: IAttribute | ObjRef | Identifier, values: Array<string | null>, negativeSelection?: boolean, localIdentifier?: string): IArbitraryAttributeFilter;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| attributeOrRef | [IAttribute](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iattribute/index.md) \| [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) \| [Identifier](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.identifier/index.md) | either instance of attribute to create filter for or ref or identifier of attribute's display form |
| values | Array&lt;string \| null&gt; | arbitrary values to filter by; can be empty array; use null for empty/missing values |
| negativeSelection | boolean | _(Optional)_ whether this is a negative filter (NOT IN); defaults to false |
| localIdentifier | string | _(Optional)_ optional local identifier for the filter |

**Returns:**

[IArbitraryAttributeFilter](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iarbitraryattributefilter/index.md)

## Remarks

Arbitrary filters allow specifying custom string values that don't need to exist as actual attribute elements. Useful for custom/external data integration scenarios.
