Monday, October 02, 2006

Default Subsets

I prefer not to have dynamic subsets as my default subset due to the annoying alerts that pop up to users.
To get round this I create a dynamic subset and then base my default subset off it in my load process.
So in my TI process that loads the departments I place this code in the epilog:

SubsetDeleteAllElements('Product', 'Default');
x = 1;
While(x <= SubsetGetSize('Product', 'CORPPRODUCT'));
vElement = SubsetGetElementName('Product', 'CORPPRODUCT', x);
SubsetElementInsert('Product', 'Default', vElement, x);
x = x + 1;

It loops round the dynamic subset called CORPRODUCT and recreates the default subset from it.
The code to produce the dymanic subset is:

You can exchange the name CORPPRODUCT for your top level element you want to drill down on.