Page 1 of 1

DimensionElementComponentAdd does not work aliases

Posted: Fri Jul 01, 2022 2:18 am
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.

Re: DimensionElementComponentAdd does not work aliases

Posted: Fri Jul 01, 2022 7:12 am
by lotsaram
This has always been the case. You need to use element principal names when using DimensionElementComponentAdd