In a previous blog, we defined how to convert an alias back to the original element name within a TurboIntegrator script. The DimensionElementPrincipalName function is only valid for TI scripts, so what happens if you need to perform the same logic in a rule?
You can convert an alias back to the Principal Name by using a combination of two functions: DIMIX and DIMNM.
The DIMIX function defines the index number of an element within a dimension. The syntax of the command is:
DIMIX (dimName, elementName)
The DIMNM function returns an element that corresponds to a specific index number. The syntax of the command is:
DIMNM (dimName, IndexNumber)
When combined, we can determine a principal name via the following approach:
- Determine the index number of the element using the alias value
- Look up the principal name via the index number from the first step
The following details exist in a dimension called Names:
DIMNM (‘Names’, DIMIX (‘Names’, ‘Johnny’)) will result in the value ‘John’
This is done by defining the index number of Johnny (index #1) and then using that value to define the principal name. This can be used in conjunction with rules in your model. If I have an input cell for a person’s name, then I don’t know if users will enter John or Johnny. I can therefore create logic to convert the input value back to the element name.
IBM Planning Analytics, powered by TM1, is full of new features and functionality. Need advice? Our team here at Revelwood can help. Contact us for more information at email@example.com. We post new Planning Analytics Tips & Tricks weekly in our Knowledge Center and in newsletters!