Page 1 of 1

deleting repeated elements in different consolidators

Posted: Tue Apr 19, 2011 9:52 pm
by knightowl
Hi All,

I have the following in a dimension

Consolidator A
Child 1
Child 2
Child n


In my TI process, I do a dimensionelementcomponenetAdd( Dimname, ParentConsolidatorA, ConsolidatorA, 1)
I do this multiple times and I roll up these consolidators under one big consolidator

I need to remove elements from the new consolidator ( ParentConsolidatorA) for example I want to remove child 2 but since Child 2 exits in two roll ups
i.e. consolidatorA and ParentConslidatorA, the DimensionelementComponentDelete( DimName, ConsolidatorA, Child 2) will fail similarly if I replace consolidator A with ParentconsolidatorA, it will also fail

I want to delete specific members from this new ParentConsolidatorA but not from the original ConsolidatorA. Any help would be appreciated !

Re: deleting repeated elements in different consolidators

Posted: Tue Apr 19, 2011 10:53 pm
by David Usherwood
Er....
How about
DimensionelementComponentDelete( DimName, ParentConsolidatorA, Child 2)
?
Deleting elements from a consolidation doesn't delete the element itself. If it fails, I suspect you haven't added it in successfully. Possibly two passes through the source are needed. Put some elispar checks in.

Re: deleting repeated elements in different consolidators

Posted: Wed Apr 20, 2011 6:17 pm
by knightowl
Doing that does not work.. I think it is because it exists in different consolidators... the error says something along the lines of could not delete child 2

Re: deleting repeated elements in different consolidators

Posted: Wed Apr 20, 2011 7:57 pm
by lotsaram
knightowl wrote:Doing that does not work.. I think it is because it exists in different consolidators... the error says something along the lines of could not delete child 2
DimensionElementComponentDelete applies to specific children in specific consolidations. If you are getting an error message then I echo the previous guidance, you are trying to delete an element from a parent of which it is not a direct child.

A

Posted: Wed Apr 20, 2011 8:15 pm
by Wim Gielis
Instead of your DimensionElementComponentDelete, use an AsciiOutput to output both child and parent to a text file. Then look at the result in the text file and try to see why it generates errors.

As said earlier, use the ELISPAR and ELISCOMP functions for checks.

Wim