Greetings, all.
I am puzzling over the method by which I can remove and repopulate the members of a special category in a dimension in transformer.
The sequence I had was
1. read all categories at the relevant level of the dimension into an array to give me a list of all categories and their position
2. Delete existing members of the special category using .Delete
3. Populate the special category with the new members, referencing their position in the main drill-down using the array in 1. and ".ConnectWithCategories"
It would appear that the .Delete function, when used against the special category Object, works also to remove those items from the main drill-down path, so that the refences read at 1. are not valid at 3.
I've tried using .ConnectWithCategories in place of .Delete in order reverse the association, but with no joy.
Unless I've overlooked the obvious, am I right in thinking that the only way to do this would be to use the ".Generate Categories" after the deletions in order to get a full category list back? (I would then have to re-arrange the sequence as 1.remove existing members 2. re-generate categories 3. read all categories 4. re-populate special category).
Alternatively, as a quick'n'dirty, if I deleted the entire special category, rather than the members, would recreation using the same code maintain the integrity of the report when the cube is published to PPES?
Thoughts and views welcome.
thanks,
lex
soi la, soi carré
I am puzzling over the method by which I can remove and repopulate the members of a special category in a dimension in transformer.
The sequence I had was
1. read all categories at the relevant level of the dimension into an array to give me a list of all categories and their position
2. Delete existing members of the special category using .Delete
3. Populate the special category with the new members, referencing their position in the main drill-down using the array in 1. and ".ConnectWithCategories"
It would appear that the .Delete function, when used against the special category Object, works also to remove those items from the main drill-down path, so that the refences read at 1. are not valid at 3.
I've tried using .ConnectWithCategories in place of .Delete in order reverse the association, but with no joy.
Unless I've overlooked the obvious, am I right in thinking that the only way to do this would be to use the ".Generate Categories" after the deletions in order to get a full category list back? (I would then have to re-arrange the sequence as 1.remove existing members 2. re-generate categories 3. read all categories 4. re-populate special category).
Alternatively, as a quick'n'dirty, if I deleted the entire special category, rather than the members, would recreation using the same code maintain the integrity of the report when the cube is published to PPES?
Thoughts and views welcome.
thanks,
lex
soi la, soi carré