Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
We have requirement where Parent is linked to the Sub Parent or directly child if a parent is linked to the Sub parent then that sub parent will also have the child .Please find the data model screen shot for reference
And input for this is kept in the single table using the table we need to divide the data model. Please find the below sample input
Category | ID | Name | Parent |
Parent | 1 | High1 | |
Child | 2 | Low1 | 3 |
Parent | 3 | Mid1 | 1 |
Child | 4 | Low2 | 8 |
Parent | 5 | Mid3 | 1 |
Child | 6 | Low4 | 8 |
Parent | 7 | High2 | |
Parent | 8 | High3 | |
Child | 10 | Low5 | 1 |
Child | 11 | Low3 | 3 |
and in the input we have category where Sub parent and parent is both categories into parent in order to recognize the parent data in the last column if data for the last column is blank then the Id is parent ID
Category (Parent)--->Last Column data id Blank then it is parent ID
Category(Parent)----> last column is not Blank it consists of the Parent ID then it is Sub Parent ID
Category(Child)---> Irrespective of anything ID may be available or not if ID is available then the child is linked to the Parent or Sub parent
Note:-Sub Parent much and should have Parent ID
Expected Output when the user selects the "High1" he should able to see his Sub Parent i.e., "Mid1" and "Mid3" again "Mid1" is connected to the Child "Low1" and "Low3" he should also able to see those two as well
and also the child which are directly linked to "High 1" i.e., "Low5"
Thanks for your response
Thanks,
Chetan
Look at the HierarchyBelongsTo and Hierarchy functions. Using the data below:
Data:
HierarchyBelongsTo(ID,Parent,Name,AncestorID,AncestorName,DepthDiff)
Load * Inline [
Category,ID,Name,Parent
Parent,1,High1,
Child,2,Low1,3
Parent,3,Mid1,1
Child,4,Low2,8
Parent,5,Mid3,1
Child,6,Low4,8
Parent,7,High2,
Parent,8,High3,
Child,10,Low5,1
Child,11,Low3,3
];
Data2:
Hierarchy(ID,ParentID,NodeName)
Load ID,
Parent as ParentID,
Name as NodeName;
Load * Inline [
Category,ID,Name,Parent
Parent,1,High1,
Child,2,Low1,3
Parent,3,Mid1,1
Child,4,Low2,8
Parent,5,Mid3,1
Child,6,Low4,8
Parent,7,High2,
Parent,8,High3,
Child,10,Low5,1
Child,11,Low3,3
];
Look at the HierarchyBelongsTo and Hierarchy functions. Using the data below:
Data:
HierarchyBelongsTo(ID,Parent,Name,AncestorID,AncestorName,DepthDiff)
Load * Inline [
Category,ID,Name,Parent
Parent,1,High1,
Child,2,Low1,3
Parent,3,Mid1,1
Child,4,Low2,8
Parent,5,Mid3,1
Child,6,Low4,8
Parent,7,High2,
Parent,8,High3,
Child,10,Low5,1
Child,11,Low3,3
];
Data2:
Hierarchy(ID,ParentID,NodeName)
Load ID,
Parent as ParentID,
Name as NodeName;
Load * Inline [
Category,ID,Name,Parent
Parent,1,High1,
Child,2,Low1,3
Parent,3,Mid1,1
Child,4,Low2,8
Parent,5,Mid3,1
Child,6,Low4,8
Parent,7,High2,
Parent,8,High3,
Child,10,Low5,1
Child,11,Low3,3
];
The good news is that you can do this ver easily using the network view. However you may want to "like" the feature request to anchor group by colours and the inclusion of a legend.
I dont understand how you can write AncestorID & AncestorName when the columns are not present in the loaded data table? When I try I get error message Field 'AcestorID' not found.