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

# modifyDrillsForInsightWidget()

- 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/insight.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 ModifyDrillsForInsightWidget command. Dispatching the created command will add or modify a new drill for the insight widget.

Drill can be setup for particular measure - meaning elements in the insight will be clickable. Exactly one drill can be specified for a measure.

What happens on click depends on the context in which the dashboard lives:

- When in KPI Dashboard (embedded or not) the defined action is actually triggered and done - it may open a new tab,  open overlay with insight, navigate to a new dashboard and carry over the filters. - When the dashboard is embedded using Dashboard component, an event will be emitted describing the defined  drill action.

**Signature:**

```typescript
export declare function modifyDrillsForInsightWidget(ref: ObjRef, drills: InsightDrillDefinition[], blacklistHierarchiesToUpdate?: IDrillDownReference[], correlationId?: string): IModifyDrillsForInsightWidget;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| ref | [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) | reference to insight widget whose drills should be modified |
| drills | [InsightDrillDefinition](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.insightdrilldefinition/index.md)[] | drills to add or modify. |
| blacklistHierarchiesToUpdate | [IDrillDownReference](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.idrilldownreference/index.md)[] | _(Optional)_ |
| 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:**

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