Page 1 of 1

Replace MDX in Subset

Posted: Thu Jun 23, 2011 12:52 pm
by HLEBOEUF
When using the subset editor you have change the mdx expression of your dynamic subset and save it again.

Its there a way to do this with TI ?

I can only find SubsetCreate, but when a subset is in use by a view you can't just delete it and recerate it.

Kind regards, Harry

Re: Replace MDX in Subset

Posted: Thu Jun 23, 2011 1:01 pm
by jim wood
I've done this (yet) but I beleive there is a section in the manuals about using MDX in TI and I know there are some posts on this forum about it.

Re: Replace MDX in Subset

Posted: Thu Jun 23, 2011 1:06 pm
by tomok
You must not have looked very hard. Right next to SubsetCreate in the documentation there is a function called SubsetCreateByMDX.

Re: Replace MDX in Subset

Posted: Thu Jun 23, 2011 1:10 pm
by HLEBOEUF
Guys,

I'm looking for a way to change the mdx statement of an existing subset that is used in views.

The SubsetCreateByMDX is well known, but i have some subsets that are used by users in their own views, and now i would like to change the subset-mdx by code .. Not by the subset-editors.

Kind Regards.

Re: Replace MDX in Subset

Posted: Thu Jun 23, 2011 1:32 pm
by jstrygner
As far as I know it is not possible via TI, but if I am wrong, I would love to know the solution (you can't CreateSubsetByMDX when its name already exists, you can't delete it if it is used by a view).

So either you (terrible):
1. Remove subset from views (you remove subset from a view by assigning another "dummy" subset for a little while, as there is no RemoveSubsetFromView function).
2. Destroy subset.
3. Create subset with new MDX.
4. Assign subset back to all views.

Or (also terrible):
1. Lay down server.
2. Play around with subset definition file - remember not only MDX needs to be changed, but you also have there information about how many characters MDX has, so you need to update this one also.
3. Bring server back to life.

HTH

Re: Replace MDX in Subset

Posted: Thu Jun 23, 2011 1:47 pm
by HLEBOEUF
That are techniques that would work but are quite crazy.

Then i will continue to do it by the subset-editor.

I've seen that in the API it is possible !

Their API is better than the TI functions .... grmmblll.