DimensionElementComponentAdd does not work aliases

Post Reply
harrytm1
Regular Participant
Posts: 226
Joined: Thu Apr 02, 2009 2:51 pm
OLAP Product: IBM Planning Analytics
Version: Latest version
Excel Version: 2003 to 2019

DimensionElementComponentAdd does not work aliases

Post by harrytm1 »

Hi all,

I am currently using PA on Cloud. We have a pretty simple TI that does DimensionElementComponentAdd in Prolog. As we deployed our solution in PAW, we used an Action Button to call this TI, and also use picklist from sets to guide user input. Such sets are using Alias since it is easier for user to visualise.

When alias values are passed as Parent and Child into DimensionElementComponentAdd, TI will hit an error which says "XXX" which is alias of a Parent (for example) is not found in the dimension. Same goes for the Child is alias is used. We had to additionally use DimensionElementPrincipalName to resolve this issue i.e. the parameters need to transform to element codes before passing into DimensionElementComponentAdd.

Our experience with DimensionElementComponentAdd previously is that we usually use elem codes. Hence, we are not sure if it has always been the case where this function needs elem code and not alias. However, based on our understanding of how TM1 works, elem code and alias should work interchangebably.

Now, we also have another TI that works similarly. The only difference is it uses DimensionElementComponentAddDirect instead of DimensionElementComponentAdd in Prolog. DimensionElementComponentAddDirect actually does work with alias values. In both cases, the function is called in Prolog so this should not be a cause.

Is this a bug on DimensionElementComponentAdd in latest version (because we are using PA on Cloud)? I saw a defect being logged saying ELAP cannot work with alias.
Planning Analytics latest version, including Cloud
lotsaram
MVP
Posts: 3651
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: DimensionElementComponentAdd does not work aliases

Post by lotsaram »

This has always been the case. You need to use element principal names when using DimensionElementComponentAdd
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply