alias.get ^v2.4.891
Returns the alias of a given element from within the dimension.
js
alias.get(dimensionName, aliasName, elementName, returnPrincipalIfMissing)Parameters
| Parameter | Type | Description |
|---|---|---|
dimensionName | string | The dimension's name. |
aliasName | string | The alias's name. |
elementName | string | The element's name. |
returnPrincipalIfMissing | boolean | Optional. true to return the principal name when the alias is not set. Defaults to false. Supported from v2.4.891. |
Returns
string | nullThe alias of the element, or null when it has none. When returnPrincipalIfMissing is true, the element's principal name is returned instead of null.
Examples
js
const noName = alias.get("Account", "No - Name", "600000");js
// Fall back to the element's name when it has no Long Name
const label = alias.get("Product", "Long Name", "PW-100", true);Related
- alias.set: updates the alias of a given element within the dimension.