Page 1 of 1

TI DeleteAllElements statement failing

Posted: Mon Sep 19, 2011 2:35 pm
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

Re: TI DeleteAllElements statement failing

Posted: Mon Sep 19, 2011 11:12 pm
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?

Re: TI DeleteAllElements statement failing

Posted: Tue Sep 20, 2011 5:17 am
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

Re: TI DeleteAllElements statement failing

Posted: Tue Sep 20, 2011 6:22 am
by Gregor Koch
Well, I wasn't really of much help in that case and am not sure why this happens.