Add Alias Attribute to Element

Post Reply
wigglyrat
Posts: 67
Joined: Wed Sep 02, 2015 3:09 pm
OLAP Product: TM1
Version: 10_2_2
Excel Version: 2010

Add Alias Attribute to Element

Post by wigglyrat »

Hello, I have an element that I am adding to a dimension via TI - to do this I have added to the Prolog for the TI:

DimensionElementComponentAdd(s_DimSample, 'All Agency Codes', 'FinGLAdjs', 1)

which has worked fine.

I want to add an alias to this element only 'Finance GL Adjustments'. How would I add this for that element only?

(The TI deletes all elements and rebuilds the hierarchy - 'FinGLAdj' is not included in our data warehouse (which is where the other elements are pulled/created from) so that is why this specific one is added in this manner, individually.)

Many thanks in advance,
Wim Gielis
MVP
Posts: 3113
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Add Alias Attribute to Element

Post by Wim Gielis »

Then you use AttrPutS or CellPutS in the Epilog of the process, to that 1 element and onto the correct alias.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
BariAbdul
Regular Participant
Posts: 424
Joined: Sat Mar 10, 2012 1:03 pm
OLAP Product: IBM TM1, Planning Analytics, P
Version: PAW 2.0.8
Excel Version: 2019

Re: Add Alias Attribute to Element

Post by BariAbdul »

Please go through this link,It is pretty useful:
http://bit.ly/1WNidi4 Thanks
"You Never Fail Until You Stop Trying......"
User avatar
qml
MVP
Posts: 1094
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: Add Alias Attribute to Element

Post by qml »

Not that there is anything wrong with this approach, but in order not to maintain an additional TI that adds one hardcoded element with some attributes I would change the SQL query of the main process that rebuilds this dimension, so that it returns FinGLAdjs as well. Since this dimension element is not present in your source data warehouse you can just do a select <some static values> from dual and union that with the existing query. That way your existing TI will be able to add this element with attributes without writing or changing any code (except this query change of course).
Kamil Arendt
wigglyrat
Posts: 67
Joined: Wed Sep 02, 2015 3:09 pm
OLAP Product: TM1
Version: 10_2_2
Excel Version: 2010

Re: Add Alias Attribute to Element

Post by wigglyrat »

thank you for your help!
Wim Gielis
MVP
Posts: 3113
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Add Alias Attribute to Element

Post by Wim Gielis »

qml wrote:but in order not to maintain an additional TI that adds one hardcoded element with some attributes
Hello Tom

Do you mean an extra TI process, or just extra statements in the same TI process ?
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply