Page 1 of 1

Retrieving Alias from Dimension to another

Posted: Tue Oct 08, 2013 2:44 pm
by ARNOJ
Morning,

I have two dimensions for accounting purpose. One dimension has an attribute that I need in the other dimension.
Dimension1 is the dimension that have the alias I need
Dimension2 is the dimnesions that need the receive the alias

therefore I have open the security object and create a rules in the dimension that need the tribute from the other one.

I have code like this :

['Acct']=S:
DB('}ElementAttributes_Dimension1',!Dimension,'Acct');

I have an error message.

however if I code a spefic account this working
['Acct']=S:
DB('}ElementAttributes_Dimension1','123456','Acct');

I don't understand what I am doing wrong

Thanks

BEst REgards

ArnoJ

Re: Retrieving Alias from Dimension to another

Posted: Tue Oct 08, 2013 3:53 pm
by qml
Try the following:

['Acct']=S: DB('}ElementAttributes_Dimension1',!Dimension2,'Acct');

Please note that Dimension1 needs to be a reference to the dimension existing in the cube you are writing the rule for, not the source cube.

Oh, and by the way, it is much better for performance if you copy the alias values using a TI process, not a rule.

Re: Retrieving Alias from Dimension to another

Posted: Tue Oct 08, 2013 4:13 pm
by ARNOJ
Thanks for your help

I use the rules because it is only way I know

I will be please to learn the TI Process way

Re: Retrieving Alias from Dimension to another

Posted: Tue Oct 08, 2013 4:55 pm
by lotsaram
You need to also remember that calling AttrS(Dim or DB(ElementAttributes_Dim to retrieve an attribute value that is an alias may retrieve a blank string if the alias value is the same as the element principal name as TM1 doesn't store the alias string where it is a match to the element name unless explicitly told to do so.