Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
there is an Employee table which contains a Employee-Manager(another employee) relation in the form of hierarchy. I would like to have it displayed as a tree, similar to this example from Reference Manual:
In the script I put the following code:
hierarchy(EMPLOYEE_ID, MANAGER_ID, NODENAME)
LOAD "EMPLOYEE_ID",
"FIRST_NAME" & ' ' & "LAST_NAME" & ' (' & EMPLOYEE_ID & ')' as NODENAME,
EMAIL,
"MANAGER_ID",
SQL SELECT *
FROM HR.EMPLOYEES;
When the list box is created with the nodename field, and "Show as Tree View" is selected nothing happens on the display; it is plain listbox as everyone is used to.
Could anyone help me to understand what I miss with the code above?
Thank you,
bartek
Hierarchies are common objects in many BI tools, and mostly are created with ease. I have quite opposite feeling with QV, ie. they are not so obvious to represent.
Do I make any error in my code? Could anyone point me to working example?
Thank you,
bartek
You need to create the "PathName" field for use in the Listbox. For example:
hierarchy(EMPLOYEE_ID, MANAGER_ID, NODENAME, , , ReportPath)
and then use ReportPath in the Listbox. See attached example qvw.
-Rob
Thanks a lot! I misunderstood the description of the optional fields from the reference manual.
I have another question: if pivot table is created with hierarchy fields, for example node1..node4, and the source data is updated so that another level in hierarchy is added ie. node5, is it possible to do that this added level would be visible automatically in previously created pivot table without updating it "manually"?
thank you,
bartek
hello bartekmaj have you find and answer to this i have the exact same problem, thanks in advance greetings
bartekmaj wrote:
Thanks a lot! I misunderstood the description of the optional fields from the reference manual.
I have another question: if pivot table is created with hierarchy fields, for example node1..node4, and the source data is updated so that another level in hierarchy is added ie. node5, is it possible to do that this added level would be visible automatically in previously created pivot table without updating it "manually"?
thank you,
bartek
Yes, I was wondering the very same thing....... how do you do that?