Page 1 of 1

Need to Create TI process to delete the subsets

Posted: Tue Jan 22, 2013 9:36 am
by devathadeepak
Hi Team,

I have 40-50 dimensions where each has 3-4 system generated Subsets , when i say system generated these are create by MDX statments in the processes.

Can you share the code to delete the subsets of all dimensions which are created with Prefix as 'SYS'.

Thanks
Deepak

Re: Need to Create TI process to delete the subsets

Posted: Tue Jan 22, 2013 10:24 am
by ioscat
is possible to somehow call TM1DimensionSubsets?

Re: Need to Create TI process to delete the subsets

Posted: Tue Jan 22, 2013 11:45 am
by David Usherwood
There's no direct TI command - but public subsets sit in the server directory in folders named <dimension>}subs . Write a TI to read the filesystem (remember the 'base' directory for TI is the server directory) using WildCardFileSearch. Once you've found the subset use SubsetDestroy. Word of warning - this will fail if the subset is part of a view, and they often will be.

Re: Need to Create TI process to delete the subsets

Posted: Tue Jan 22, 2013 7:24 pm
by lotsaram
If you have already looked at the bedrock code library how could you have failed to notice that it includes processes to perform exactly this function for views and subsets?