
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Organigram : how to get the child nodes
Hello,
I have this organigram based on a table with following fields : SECTION - FATHER - NAME.
And this is enough to display the organigram in our our application :
In Qlikview, I use the "Hierarchy" syntax, and it is OK, I get an organigram.
I have 2 questions :
1- In my table, I had to add 2 redundant "path" and "depth" fields. And for each record, I had to specify the corresponding hierarchy "TOP/GROUPE HOSPITALIER/ DEPARTEMENT INFIRMIER..." in the field "path" and compute the corresponding "depth"... It works. But is it really necessary to do and maintain that ? With child/parent information, it should be sufficient to get all the hierarchy.
2- Using the "HierarchyBelongsTo" syntax, I get for one service, all his parents up to the top. OK, but what we need is just the opposite : when selecting a departement, I would like to get all his services, even those located at the lowest level.
Thanks for any help,
Denis


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You shouldn't need to maintain the path and depth field, these should be generated when using the HIERARCHY LOAD prefix.
Also, AFAIR, using the HierarchyBelongsTo LOAD prefix, you should be able to select entire subtrees.
Maybe it's just a matter of how you used the parameters to the LOAD prefixes.
Could you upload some sample data records and your currents script?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Here are the data (Firebird database) :
The SECTION_DEPTH seems to be optional, as I clear from the table all section_depths or if I remove the reference in the Hierarchy procedure, it is still OK.
But the SECTION_PATH seems to be obligatory. If I remove the section_path field from the Hierarchy function, the organigram is not OK.
Here is the script (with "select" instead of "load", as I read data from Firebird database with ODBC).
section_hierarchy:
Hierarchy (SECTIONKEY,
FATHER_SECTION,
SECTIONNAME,
,
SECTIONKEY,
mySECTION_PATH,
'|',
mySECTION_DEPTHEPTH)
SELECT
"SECTION" as SECTIONKEY,
"NAME" as SECTIONNAME,
FATHER as FATHER_SECTION,
SECTION_PATH as mySECTION_PATH,
SECTION_DEPTH as mySECTION_DEPTH
FROM "SECTION" as SECTIONTREE;
section_ancestors:
HierarchyBelongsTo(SECTIONKEY,
FATHER_SECTION,
SECTIONNAME,
ANCESTOR_ID,
ANCESTORNAME)
SELECT
"SECTION" as SECTIONKEY,
"NAME" as SECTIONNAME,
FATHER as FATHER_SECTION
from "SECTION" as ANCESTORLIST;
Here is the result in the interface for the organigram and the ancestors list.
In this example, we see that if we select "1045", we get the 3 upper nodes 1035,1044,1045. We would like to get 1045, 1049 and 1050 instead.
I hope this could help.
Denis

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Up to now, no answer to my questions : how to get child nodes in an organigram ?
We just need the oposite of "HierarchyBelongsTo".
With no answer to this question, we will not use QlikView with our application StaffPlanner and it will not be promoted to 50 organisations using StaffPlanner, as StaffPlanner is mainly based on organigram management.
Thanks for any help,
Denis


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
selecting a collapsed mySECTION_PATH node in its tree view list box will select all children as well, that's default behaviour coming without any scripting efforts ...
hope this helps
regards
Marco
