Skip to content

alias.get ^v2.4.891 ​

Returns the alias of a given element from within the dimension.

js
alias.get(dimensionName, aliasName, elementName, returnPrincipalIfMissing)

Parameters ​

ParameterTypeDescription
dimensionNamestringThe dimension's name.
aliasNamestringThe alias's name.
elementNamestringThe element's name.
returnPrincipalIfMissingbooleanOptional. true to return the principal name when the alias is not set. Defaults to false. Supported from v2.4.891.

Returns ​

string | null

The 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);
  • alias.set: updates the alias of a given element within the dimension.