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

# modifyAttribute()

- 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/attribute/factory.ts

Allows modification of an existing attribute instance.

**Signature:**

```typescript
export declare function modifyAttribute(attribute: IAttribute, modifications?: AttributeModifications): IAttribute;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| attribute | [IAttribute](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iattribute/index.md) | attribute to modify |
| modifications | [AttributeModifications](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.attributemodifications/index.md) | _(Optional)_ modification function |

**Returns:**

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

## Remarks

The returned attribute will have the same localId as the original attribute. If you would like to assign new/different local identifier to the attribute, you can do that using the modifications where you can provide either new custom localId or indicate that the attribute should fall back to the auto-generated localId.
