Hierarchy attribute issues

Post Reply
User avatar
PavoGa
MVP
Posts: 616
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.9.1
Excel Version: 2013 PAW
Location: Charleston, Tennessee

Hierarchy attribute issues

Post by PavoGa »

Using an attribute "Caption" on the hierarchies. This is an alias in both }DimensionAttributes and }ElementAttributes_}Dimensions. If the hierarchy is the current default hierarchy in use, it has a default value for the caption, say "Accounts Planning." }ElementAttributes_}Dimensions Caption attribute is populated by rule from }DimensionAttributes Caption attribute.

When adding a new hierarchy in the Prolog and that hierarchy is to be the new default, after creating the new hierarchy, I set the old hierarchy attribute to some like "Accounts Planning - Per1" and then attempting to set the new hierarchy as "Accounts Planning." It is not allowing the second change for the new hierarchy's caption to "Accounts Planning" in either the DATA or EPILOG procedure. The error being received is
Attribute is Not Unique
Have tried creating the hierarchy through EXECUTEPROCESS, but that is not working either. Testing by retrieving the attributes results:

HierarchyAttrS on the original hierarchy returns the updated caption: Accounts Planning - Per1
ATTRS on the original hierarchy (dimname:OldHierName) returns: Accounts Planning - Per1.
DimensionElementPrincipalName for the supposedly replaced caption, "Accounts Planning" is returning the original hierarchy name (dimname:OldHierName)

The update occurs by running a second process after the first one completes.

I could not find anything in the documentation or searching online about this behavior. Is this a known behavior? Has anyone else observed this? Makes it aggravating to update the attributes when creating them and certainly not expected.
Ty
Cleveland, TN
User avatar
PavoGa
MVP
Posts: 616
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.9.1
Excel Version: 2013 PAW
Location: Charleston, Tennessee

Re: Hierarchy attribute issues

Post by PavoGa »

Good gracious. Figured this one out. Kind of too deep in and could not see the forest for the trees. Problem is the overwrite of the caption containing the default name was not being committed. So updating the new hierarchy's caption was failing because it was checking committed data, not the cached. My DUH moment for the week. Here is an outline of the problem in case I'm not the only one who forgets this and runs into it.

1. Hierarchy A has Caption "Default"
2. Create Hierarchy B
3. Write "Default - Old" to Hierarchy A caption
4. Write "Default" to Hierarchy B caption. This fails because transaction 3 is sitting cached and is not committed.

One solution is to use TM1RunTI to overwrite the caption for Hierarchy A (keeps it out of the current processes cache) or
CubeSaveData('ElementAttributes');
Ty
Cleveland, TN
Post Reply