TI DeleteAllElements statement failing

Post bug reports and the status of reported bugs
Post Reply
User avatar
Michel Zijlema
Site Admin
Posts: 712
Joined: Wed May 14, 2008 5:22 am
OLAP Product: TM1, PALO
Version: both 2.5 and higher
Excel Version: 2003-2007-2010
Location: Netherlands
Contact:

TI DeleteAllElements statement failing

Post by Michel Zijlema »

I just hit the following obscure issue (tested in 9.5.1 and 9.5.1 HF16):

When I have the following statements in my TI, the DimensionDeleteAllElements is failing:
DimensionSortOrder(v_dim, 'ByName', 'Ascending', 'ByHierarchy', 'Ascending');
DimensionDeleteAllElements(v_dim);

If I however reverse the order of the two statements, then the DimensionDeleteAllElements is working, so the following is indeed deleting all elements:
DimensionDeleteAllElements(v_dim);
DimensionSortOrder(v_dim, 'ByName', 'Ascending', 'ByHierarchy', 'Ascending');

A thing to note about the specific situation is that all metadata changes in the regarding TI process take place on the Prolog tab (the process copies a hierarchy from one dimension to another by iterating through the source dimension using a WHILE loop).

I can't see any reason why the DimensionSortOrder can't be executed before the DimensionDeleteAllElements, that's why I would consider this to be a bug.

Michel
Gregor Koch
MVP
Posts: 263
Joined: Fri Jun 27, 2008 12:15 am
OLAP Product: Cognos TM1, CX
Version: 9.0 and up
Excel Version: 2007 and up

Re: TI DeleteAllElements statement failing

Post by Gregor Koch »

Michel Zijlema wrote:I just hit the following obscure issue (tested in 9.5.1 and 9.5.1 HF16):


DimensionSortOrder(v_dim, 'ByName', 'Ascending', 'ByHierarchy', 'Ascending');
DimensionDeleteAllElements(v_dim_dst);

DimensionDeleteAllElements(v_dim);

Michel
Is it maybe because you are trying to delete two different (unless v_dim_st and v_dim are the same) dimensions?
User avatar
Michel Zijlema
Site Admin
Posts: 712
Joined: Wed May 14, 2008 5:22 am
OLAP Product: TM1, PALO
Version: both 2.5 and higher
Excel Version: 2003-2007-2010
Location: Netherlands
Contact:

Re: TI DeleteAllElements statement failing

Post by Michel Zijlema »

Gregor Koch wrote:
Michel Zijlema wrote:I just hit the following obscure issue (tested in 9.5.1 and 9.5.1 HF16):


DimensionSortOrder(v_dim, 'ByName', 'Ascending', 'ByHierarchy', 'Ascending');
DimensionDeleteAllElements(v_dim_dst);

DimensionDeleteAllElements(v_dim);

Michel
Is it maybe because you are trying to delete two different (unless v_dim_st and v_dim are the same) dimensions?
Hi Gregor,

Thanks for reading carefully :geek:
I've updated my original post - the difference in dimension name variables in the original post was caused by me editing the original code (which used v_dim_dst in all places) before posting.

Michel
Gregor Koch
MVP
Posts: 263
Joined: Fri Jun 27, 2008 12:15 am
OLAP Product: Cognos TM1, CX
Version: 9.0 and up
Excel Version: 2007 and up

Re: TI DeleteAllElements statement failing

Post by Gregor Koch »

Well, I wasn't really of much help in that case and am not sure why this happens.
Post Reply