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

# replaceNestedLayoutSectionItem()

- 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/layout.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 ReplaceSectionItem command. Dispatching this command will result in replacement of particular dashboard item with a new item. By default, the old item will be discarded, however you may specify to stash it for later use.

**Signature:**

```typescript
export declare function replaceNestedLayoutSectionItem(itemPath: ILayoutItemPath, item: DashboardItemDefinition, stashIdentifier?: StashedDashboardItemsId, autoResolveDateFilterDataset?: boolean, correlationId?: string): IReplaceSectionItem;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| itemPath | [ILayoutItemPath](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ilayoutitempath/index.md) | path where the item to replace resides |
| item | [DashboardItemDefinition](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboarditemdefinition/index.md) | new item definition |
| stashIdentifier | [StashedDashboardItemsId](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.stasheddashboarditemsid/index.md) | _(Optional)_ specify identifier of stash where the old item should be stored |
| autoResolveDateFilterDataset | boolean | _(Optional)_ specify whether dashboard should auto-resolve date dataset to use for date filtering of KPI or insight widget that is replacing the existing item; default is disabled meaning date filtering will be enabled only for those KPI or Insight widgets that already specify dateDataset. |
| correlationId | string | _(Optional)_ specify correlation id to use for this command. this will be included in all events that will be emitted during the command processing |

**Returns:**

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