How script alias to dimension

Product:
Planning Analytics 2.0.9.18
Microsoft Windows 2019 server

Issue:
How make a TM1 Ti process who read values from a file and add them as alias to a dimension?

Solution:

Create a text file with the first column with the elements in the dimension names, then the second column with the text you want to have in the alias.

Above we have two alias that we want to add to each element.

Create a new TM1 TI process and load the file similar to this: (you have to upload the file first, and then in the TI code change to location from where the file is read)

In the data source tab, enter the Variables name and change to String type.

Enter the parameters you need, to make the process work with any dimension and alias name that you need in future. When you run the process, you change filename and path etc to the values that are correct for you.

Enter a script similar to above. You can add code to check for it the alias exist, and not delete the attribute and then only update the elements listed in the text file.  Run the process and enter your filename.

The alias attribute are listed in the dimension.

You can view an icon indicating the attribute type in column headers. Click Settings icon and enable the Attribute type option to see the attribute type on column headers. Disable this option to hide the attribute type on column headers.

More Information:

https://everanalytics.wordpress.com/2017/08/10/tm1_alias_attributes/ 

Accomplish Attibute Update in Cognos TM1 Smartly!

https://everanalytics.wordpress.com/2015/07/26/create-a-very-large-dimension-in-cognos-tm1-using-turbo-integrator-ti/ 

AttrPutS in TM1: How to Use and Syntax

https://cubewise.com/blog/tm1-attributes-things-to-be-aware/ 

https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=cdipawc-import-members-attributes-into-dimension-in-planning-analytics-workspace