Page 1 of 1

Destroying '}CellSecurity_' and '}ElementSecurity_' Cubes via TI

Posted: Thu Dec 22, 2016 5:12 pm
by mnaithan
Hello, I am trying to destroy all current '}CellSecurity_' and '}ElementSecurity_' Cubes via TI ( with dimension '}Cubes' as data souce and SUBSET = 'ALL') , but I found a strange behavior that I have to run TI 3,4 time to delete every }CellSecurity_' and '}ElementSecurity_' Cube , its deleting some cubes in every run instead of at once

MetaData Tab:

If( Subst(vCube,1,14) @= '}CellSecurity_' % Subst(vCube,1,17) @= '}ElementSecurity_');
CubeDestroy(vCube);
Endif;

Does anyone knows reason for this, or the better approach would be removing these .cub files from data directory rather then destroying via TI, thanks

Re: Destroying '}CellSecurity_' and '}ElementSecurity_' Cubes via TI

Posted: Thu Dec 22, 2016 5:23 pm
by declanr
Try instead having no datasource and looping the dimension backwards:

Code: Select all

iCount=DimSiz(cDim);
While(iCount > 0);
      sCubeName= DimNM(cDim, iCount);
      If....
      
      Endif...
      iCount = iCount - 1;
End;

Re: Destroying '}CellSecurity_' and '}ElementSecurity_' Cubes via TI

Posted: Thu Dec 22, 2016 11:24 pm
by mnaithan
It worked ..!., thanks Declan