What DimensionElementInsert Means
DimensionElementInsert as you would expect inserts a new element into a dimension in TM1.
Syntax of DimensionElementInsert
The syntax DimensionElementInsert (Dimension, InsertionPoint, ElName, ElType); where:
Dimension refers to the dimension to which you want to add a new element.
InsertionPoint is an existing dimension element. The element being added to the dimension will be inserted immediately before this existing element. If this parameter is empty, the new element is added to the end of the dimension.
ElName is the name you want to assign to the new element.
ElType is the element type. There are three possible ElType values, namley:
- N – for a numeric element.
- S – for a string element.
- C – for a consolidated element.
DimensionElementInsert is often used in combination with an IF statement along with a DIMIX statement to test if an element exists in a dimension and then to insert it if it does not exist and a DimensionElementComponentAdd statement to then add it into a hierarchy.
DimensionElementInsert (‘GL Account’, ”, vObject_and_Sub_Account, ‘n’); will insert the current value of the variable vObject_and_Sub_Account into the dimension GL Account at the very end (the empty single quotes) as an “N” level element.
This function can only be used in Turbo Integrator processes.