DIMIX checks if an element exists in a dimension either as a primary element ID or as an Alias, and if so, returns the index value of the element. If there is no element for the value being tested, it will return a 0.
Syntax of DIMIX
The syntax is:
DIMIX (dimension, element);
- Dimension, is the name of the dimension you want to check
- Element, is the name of the element you are checking to see if it already exists
Use and Example
This function is quite often used with an IF statement to check if an element exists in the form of
IF ( DIMIX ('Year', sYear ) = 0);
This statement will check if the contents of the sYear variable exists in the Year dimension. If variable sYear is not in the Year dimension then the DIMIX will return 0. This is then compared to “0” in the IF statement which gives a true answer.
From here you could add a DimensionElementInsert to add the element if required.
This function can be used in Rules and Turbo Integrator processes. Remember, you can use it to assess both the regular element ID and to assess an Alias.