Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm struggling with the Hierarchy load, and would surely need some help. The reference manual is not very extensive in this particular area.
Attached is aa example with just a small amount of data, but it shows how my data set will look like. Basically it is a bill of material structure, where I want to first build the hierarchy and then add some features.
I am primarily focusing on 3 columns of data. First column contains all items that have a child (a structure that should be able to expand). Second column contains the child item and third column contains the quantity of the child that goes into the parent.
Parent | Child | Quantity |
---|---|---|
1 | 2 | 1 |
1 | 100 | 0.5 |
1 | 101 | 1 |
2 | 3 | 2 |
2 | 4 | 2.5 |
2 | 20 | 8 |
2 | 200 | 5 |
3 | 30 | 0.05 |
3 | 300 | 1 |
4 | 400 | 5 |
4 | 401 | 7 |
20 | 2000 | 0.9 |
30 | 3000 | 10 |
As you can see, Item 1 consists of item 2, 100, and 101 while in turn, item 2 also is a parent. There are basically no limitations in how many items or how many levels there can be.
What I would like to see is a tree structure that can be expanded for each parent, and also the possibility to select a child to see which parents it belongs to. In addition, I would also like to see the quantity within the tree structure (if possible).
As a final tweak, it would be awesome if I could load a quantity that should be produced, and get the total required amount of all items in the hiearchy. As example; I load a production quantity of 1000 for item 1, meaning it will require 1000 units of item 2, while that would require 2000 units of item number 3 and so on and so forth.
Any help with this would be very much appreciated, even if it is not the entire solution.
The attached example is just in its beginning. First hick-up is that I cannot get all parents to load in level 1 unless I add them as childs with no parent.
Best regards
Robert
You need to have one row per node. I.e. you should have a row also for node number 1 (with a blank or NULL as parent).
Then you should be able to load the hierarchy using
Hierarchy (NodeID, ParentID, NodeName, ParentName, Child, Path, '/', Depth)
Load
Parent as ParentID,
Child as NodeID,
Child as NodeName,
Quantity
From ...
Once you've done that, the tree structure is there in a List box (use the field "Path") and the quantity can be summed in a pivot table.
HIC
Hi,
I try to bump this once, still hoping to get a tip or suggestion of how to start .
Kind Regards
Robert
You need to have one row per node. I.e. you should have a row also for node number 1 (with a blank or NULL as parent).
Then you should be able to load the hierarchy using
Hierarchy (NodeID, ParentID, NodeName, ParentName, Child, Path, '/', Depth)
Load
Parent as ParentID,
Child as NodeID,
Child as NodeName,
Quantity
From ...
Once you've done that, the tree structure is there in a List box (use the field "Path") and the quantity can be summed in a pivot table.
HIC