Page 1 of 1

Help with bedrock's dim.clone.fromsubset

Posted: Tue Jul 30, 2013 6:52 am
by kaazimraza
Hi all,

I have a scenario where I have to unite two dims into one. so I decided not to reinvent the wheel and bank on the existing dim cloning process from Bedrock. I tweaked it a little, by commenting out the call to dim.hierarchy.unwind.all in the 'Prolog' part, as I am cleaning out the dim structure entirely in the Parent process which is calling this Bedrock process. However; after the modifications, it is leaving out some of the children elements, i.e. it does not add all children elements for all C level, for instance, if source dimension has a C level element Expense Accounts having 1,2,3,4,5 elements, it is adding element 1 4 to 5 times in the target element under Expense Accounts.

In the 'Metadata' tab, i changed the bit where it is adding the element, from

Code: Select all

  

## Add the element to the target dimension.
 DimensionElementInsert( pTargetDim, '', vElement, 'N' );
To

Code: Select all

DimensionElementComponentAdd( pTargetDim, pConsolElement, vElement, 1 );
Would appreciate if someone can help me through this one.

[Edit]
I am using TM1 9.5.2 with Windows 7 and Excel 2010 (clients).

Re: Help with bedrock's dim.clone.fromsubset

Posted: Wed Jul 31, 2013 5:23 am
by kaazimraza
Um...guys, no one?

Re: Help with bedrock's dim.clone.fromsubset

Posted: Wed Jul 31, 2013 5:33 am
by Alan Kirk
kaazimraza wrote:Um...guys, no one?
Can't say that I'm a huge Bedrock fan so I really don't know that code off by heart, but more to the point I'm reluctant to assume that we would be singing from the same sheet (i.e. version) of the code even if I did.

If you put the full code up (or better still, the .pro file) I'm quite happy to take a look at it when I have a moment (and I can't guarantee that that would be immediately) but I wouldn't like to make assumptions that your subtractions and additions would be the same as what I might see if I were to try the same thing.

Re: Help with bedrock's dim.clone.fromsubset

Posted: Wed Jul 31, 2013 10:55 pm
by Martin Ryan
Ditto to the request for the full code but from your description of the problem I would hazard a guess that you have a counter that isn't incrementing correctly, or perhaps you're using the wrong counter in the wrong place.

Re: Help with bedrock's dim.clone.fromsubset

Posted: Thu Aug 15, 2013 3:01 am
by kaazimraza
Hi all,

Thanks for your replies. I have been able to crack it. There were two things that I corrected. One the source subset, where not all elements were expanded. Secondly, I sorted the dimension on hierarchy. these two things gave me the result I was looking for.

Apologies for late reply.