Page 1 of 1

}ElementAttributes_ not updated with attributes

Posted: Tue Oct 09, 2018 11:44 am
by Bakkone
Hi all,

Im on PA 2.0.5 but I have had this problem on different versions.

My dimensions are updated either through the dimension loads or when new data is loaded.

For some reason the alias attributes in the corresponding }ElementAttributes-cubes are not updated when attributes are set. So everything looks ok in Perspectives, Architect or Performance Modeler. But if I look in the control cubes the attribute is missing. This in turn causes processes and rules to break.

Any ideas of what Im doing wrong?

Re: }ElementAttributes_ not updated with attributes

Posted: Tue Oct 09, 2018 11:49 am
by bgregs
Hi Bakkone,

Can you share some sample code on how you are populating the alias attribute? If it's helpful I usually populate aliases by loading to a text attribute and then using a rule on the attributes cube to pull that text attribute into a separate alias attribute. That way it's only populating a single text field. I've never had issues with that approach.

Re: }ElementAttributes_ not updated with attributes

Posted: Tue Oct 09, 2018 12:21 pm
by tomok
By chance are the alias attribute values missing the same as the element name? Whenever you have an alias set on a dimension and you have one or more alias values that are the same as the elements then TM1 will not accept those values in the }ElementAttributes_ cube. There were still be a value for the alias, like when toggle the alias on and off, but the cube will be empty for that element.

Re: }ElementAttributes_ not updated with attributes

Posted: Tue Oct 09, 2018 12:54 pm
by BariAbdul
Hi Bakkone,

Can you share some sample code on how you are populating the alias attribute? If it's helpful I usually populate aliases by loading to a text attribute and then using a rule on the attributes cube to pull that text attribute into a separate alias attribute. That way it's only populating a single text field. I've never had issues with that approach.
Hi bgregs , just a bit curious about your approach, if I understand you correctly, that is you are inserting only one attribute and afterwards using it as alias. Why can't you insert another attribute as AttrInsert ( DimName, ‘Name’, ‘Status’ , ‘A’ );

Could please you elaborate further with an example. Thanks

Re: }ElementAttributes_ not updated with attributes

Posted: Tue Oct 09, 2018 1:57 pm
by bgregs
Could please you elaborate further with an example. Thanks
For the cases that I have a rule involved, our aliases are concatenations of code and string. It makes for quicker updates (sometimes the business likes to update things from Excel), to just have a text field that they are modifying. You can also get around duplicate aliases by concatenating the code (especially useful when the business wants to update their own aliases....yes, I lost that battle).

For a simple alias creation, of course...use a TI and pop that thing in there. But for cases where the alias is changing and we don't have much control, it was a simple implementation and the performance impact is negligible.

Re: }ElementAttributes_ not updated with attributes

Posted: Tue Oct 09, 2018 4:53 pm
by Wim Gielis
tomok wrote: Tue Oct 09, 2018 12:21 pmWhenever you have an alias set on a dimension and you have one or more alias values that are the same as the elements then TM1 will not accept those values in the }ElementAttributes_ cube. There were still be a value for the alias, like when toggle the alias on and off, but the cube will be empty for that element.
That's why I rolled my own generic TI script to populate }ElementAttributes cubes for alias values that are empty.
It allows us to use the }ElementAttributes cubes instead of DBRA in Perspectives and websheets, for example.

Executing the generic process can be done for 1 dimension, all dimensions in 1 cube, all application dimensions, dimensions respecting a wildcard pattern, ... you name it. I use a recursive approach such that 1 TI process can still suffice for this exercise. The mother process calls itself with different parameter values.
This recursive approach and cube/dimension selections is used in other generic processes. I can recommend anyone adopting this approach.

Re: }ElementAttributes_ not updated with attributes

Posted: Thu Oct 11, 2018 2:59 pm
by Bakkone
Hi all!

I think Tomok has identified the issue. I always add an alias that contains the same Alias as the invariant name. I then use this alias in some processes etc and this is were I have failed and run into problems.

}ElementAttributes cube seems to update fine even when alias = invariant if I create the element and use the ATTRPUTS() on this alias in a dimension load process. So everything is done in the same TI-process.

If the element was originally created without immediatly writing this alias in the same process. This never updates properly. In my case I add missing elements when loading data. From an attribute editor perspective it looks like all aliases have recieved the invariant name as the alias. But the }ElementAttributes cube will be blank for these elements and attributes. If I then run the dimension load process to find all the other attributes, it looks like everything gets updated but the }ElementAttributes doesnt get updated with these particular aliases. I guess the system thinks that there has been no change.


Will add a proper ATTRPUTS to the current processes to fix it. I guess I should also get into the habit of using DIMENSIONELEMENTPRINCIPALNAME instead of this alias. I just wanted to use the same in both TI and Rules... guess I will have to change my ways.


Thanks for the help guys!