Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I almost see the all Hierarchy examples with 3 fields I mean with 3 levels , Can someone please post an example of it with just 2 fields ,
I have 2 fields - Group and Function , Group is ParentId and Function is Child/Nodeid , I need to create a list box with Tree view structure .. which is used as a filter.
Thanks
did you tried this
Hierarchy(NodeID,ParentID,NodeName, , , ,Path,'&',Depth) 3 blank fields ??
Currently I don't have the QV licence ...please share the table snapshot s from the model (Hierarchy table )
ServiceTimeSeries:
Hierarchy(NodeID,ParentID,NodeName,,,Path,'&',Depth)
Load
FCIGroup as ParentID,
Function as NodeID,
Function as NodeName,
'' as Status,
*;
LOAD
"Date" as "ServiceTimeSeries.Date",
if(WildMatch("Group",'*Payments*'),'Payments',
if(WildMatch("Group",'*Payroll*'),'Payroll',"Group")) as FCIGroup,
"Service API" as "Function",
("Count1") as "RequestCount",
("FC1") AS "FCCount",
("Count") as "RequestCount_All",
("FC") AS "FCCount_All",
"FCI",
"RYG_FCI",
"RYG_TP99",
"SLA_FCI",
"SLA_TP99",
"TP50",
"TP90",
"TP99",
"TP999"
Resident Table1 where "Date" >= '9/1/2015';
Drop Table Table1;
Exit script;
and here are the screen shots of the data , actually I don't find the Path field created in the script,
Any help on this?
Hi,
try using
Hierarchy(NodeID,ParentID,NodeName,,NodeName,Path,'&',Depth)
and correct your data/logic as your Group and Function fields do not have too many common values, which they should to define a hierarchy. (In fact I didn't find a single common value).
hope this helps
regards
Marco
What do you mean by common values it is supposed to be grouping by related values in database?
here I selected Billing , and its related values are shows in the data , I was expecting that there is going to be a main group Billing and its related values will appear in subgroup ..
I guess a hierarchy load is not what you are looking for.
Try
LOAD Group&'&'&Function as GroupFunction
...
instead. And use GroupFunction in your tree view list box using '&' as separator.
hope this helps
regards
Marco
If I understood correctly, you don't need a Hierarchy Load then, just create a new concatenated field to build the tree:
TREE:
LOAD Group & '/' & Function as Tree, Group, Function
INLINE [
Group, Function
Billing, renew
Billing, Subscribe
];
Concatenate (TREE)
LOAD Group as Tree, Group , Function
RESIDENT TREE;
Now use Tree field in the list box and enable tree view option.
Actually this was the first option I tried , but with this I am not able to select a Group value , please find the attached.Nothing happens when I select Group value
Got it .. Thank you!