Skip to content

element.create deprecated ​

Creates an element in a dimension, outside any hierarchy.

Deprecated

Use hierarchy.group for child elements, or hierarchy.structure for parent elements, instead. They create the element and place it in a hierarchy in one step.

js
element.create(dimension, name, type)

Parameters ​

ParameterTypeDescription
dimensionstringThe dimension's name or id.
namestringThe element's name.
typestring"N" for a numeric element or "S" for a string element. "S" is only used in measures dimensions.

Returns ​

string

An empty string when it succeeds, or a message starting with "Error:" when it fails. If the element already exists, nothing changes and it still succeeds.

Examples ​

js
element.create("Account", "600010", "N");