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

# newDefForItems()

- Package: [@gooddata/sdk-model](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-model/src/execution/executionDefinition/factory.ts
- Guides: [Run a custom execution](https://www.gooddata.ai/docs/gooddata-ui/latest/data-layer/execution/custom-executions/index.md), [Execution model](https://www.gooddata.ai/docs/gooddata-ui/latest/data-layer/execution/execution-model/index.md)

Prepares a new execution definition for a list of attributes and measures, filtered using the provided filters.

**Signature:**

```typescript
export declare function newDefForItems(workspace: string, items: IAttributeOrMeasure[], filters?: INullableFilter[]): IExecutionDefinition;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| workspace | string | workspace to execute against, must not be empty |
| items | [IAttributeOrMeasure](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iattributeormeasure/index.md)[] | list of attributes and measures, must not be empty |
| filters | [INullableFilter](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.inullablefilter/index.md)[] | _(Optional)_ list of filters, may not be provided |

**Returns:**

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

## Remarks

This function MUST be used to implement IExecutionFactory.forItems();
