Skip to main content

Data & Intelligence

SwapAliasWithPrincipalName – Using Alias as Dimension Element

In TM environments that have models to plan employee-based salaries, dummy names are used as placeholders. As positions are filled, the intention is to replace the place holders with the actual employee code or names. This is only an isolated example. Similar needs would exist in multiple ways within an implementation.

To support this, TM1 has a newer function SwapAliaswithPrincipalName. The implementation of the function in an environment must be done properly to avoid data loss and confusion.

Data Intelligence - The Future of Big Data
The Future of Big Data

With some guidance, you can craft a data platform that is right for your organization’s needs and gets the most return from your data capital.

Get the Guide

Three to Four TI processes are required to achieve the change. Steps:

  • Determine an alias to perform this function. This alias needs to be unique and not used elsewhere.
  • Create process 1 to save data and delete the alias. (Create the alias manually for first run). This provides a clean slate.
  • Create process 2 to add the alias back and update the alias for the old element value to the new value.
  • Create process 3 to “Swap”. Command = SwapAliasWithPrincipalName(DimName,AiasName,Flag); I have usually used the flag value of 0.
  • Create process 4 to update other attribute values. This is optional, but will be used more often than not

The values can be supplied as parameters and the update chain can be executed using a wrapper process.

End result, the name of the dummy employee/ place holder is now replaced with the actual employee’s name.

Other processes, especially, if they refer to consolidated elements, may produce an error – “Element not found”. Server restart should fix this.

For end-user control, create an active form and give users access to execute processes.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Gaurav Jain

More from this Author

Follow Us