Page 1 of 1

Copy Hierarchical Dimension

Posted: Fri May 25, 2012 2:26 pm
by lav4you
Hi All,

I have a requirement where I have to copy entire one hierarchical dimesion to another dimension in same order using TI.
I went through the forum and there were many post with codes to copy diemension but all were creating messy dimensions.
I want something clean and proper.
I do understand that TM1 is missing a function which can tell parent for the given element.

Following is a dimension example

All
----Country 1
---------------City1
---------------------Center1
---------------------Center2
---------------City2
---------------------Center3
---------------------Center4
----Country 2
---------------City3
---------------------Center5
---------------------Center6
----Country 3
---------------Center7
---------------Center8

I am trying to developing code for this but It would be a great help if any of you can share a TI code for above requirement if has done earlier.

Regards,
Lav

Re: Copy Hierarchical Dimension

Posted: Fri May 25, 2012 2:41 pm
by declanr
lav4you wrote:I do understand that TM1 is missing a function which can tell parent for the given element.
... ELPAR


Have you tried searching the forums for this as it is quite a common query and I am certain I saw pretty much the same post not too long ago.
In addition to this I believe the bedrock site has a TI to replicate a dimension so you could take that TI and strip out the relevant parts.

Re: Copy Hierarchical Dimension

Posted: Fri May 25, 2012 2:42 pm
by qml
You can go to the Bedrock webpage and download that code base. You'll find a Bedrock.Dim.Clone process there which does exactly what you need. This is of course if you'd rather just get the job done instead of learning something useful.

And TM1 might be missing a few things, but a function to get the parent of an element is not one of those things. This function is called ELPAR.

Re: Copy Hierarchical Dimension

Posted: Fri May 25, 2012 2:44 pm
by declanr
http://www.tm1forum.com/viewtopic.php?f=3&t=6556

^ Said recent post... most queries you have can be solved by quickly searching the forum.