---
url: /process-functions/alias-set.md
description: Updates the alias of a given element within the dimension.
---

# alias.set

Updates the alias of a given element within the dimension.

```js
alias.set(dimensionName, aliasName, elementName, value)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `dimensionName` | `string` | The dimension's name. |
| `aliasName` | `string` | The alias's name. |
| `elementName` | `string` | The element's name. |
| `value` | `string` | The alternate name to save as the element's alias. |

## Returns

An empty string when it succeeds, or a message when it fails.

::: warning When the alias isn't updated

* The element must already exist.
* The alias can't be the element's own name.
* The alias can't be another element's name or alias.
  :::

## Examples

```js
alias.set("Account", "No - Name", "600000", "600000 - Revenue");
```

## Related

* [alias.get](/process-functions/alias-get): returns the alias of a given element from within the dimension.
* [alias.wipe](/process-functions/alias-wipe): wipes the data on an alias within a dimension, keeping the alias itself.
