Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following hierarchy:
Path | Node | NodeId | ParentId |
AAA | AAA | 1 | |
AAA>BB | BB | 2 | 1 |
AAA>BB>C | C | 3 | 2 |
AAA>CC | CC | 4 | 1 |
I displayed in a listbox with the option
But then when I click on the first node 'AAA', the selection is different whether the node is collapsed or expand.
When Collapsed:
When Expanded:
I understand the concept, but how to force the selection of "sub node" when the selected node is expanded?
The Treeview list box is designed to do exactly this: Collapsed node and you select the entire sub-tree; Expanded node and you select the node only.
If you want to select the entire sub-tree, you will have to click-and-drag so that you mark several field values.
Or - you change your data model so that you get a "Tree" table also. See http://community.qlik.com/blogs/qlikviewdesignblog/2013/11/11/unbalanced-n-level-hierarchies. A selection in the "Path" field in this table will link to entire sub-trees.
HIC
Document Properties > Triggers > Field Event Triggers > Path > On Select > Add Action(s):
Add > Select in Field
Field:
=if(GetSelectedCount(Path)>0, 'Path')
Search String:
='(' & concat({1<Path={$(=concat(chr(39) & Path & '*' & chr(39), ','))}>}distinct Path,'|') & ')'
I have attached the working file.
The Treeview list box is designed to do exactly this: Collapsed node and you select the entire sub-tree; Expanded node and you select the node only.
If you want to select the entire sub-tree, you will have to click-and-drag so that you mark several field values.
Or - you change your data model so that you get a "Tree" table also. See http://community.qlik.com/blogs/qlikviewdesignblog/2013/11/11/unbalanced-n-level-hierarchies. A selection in the "Path" field in this table will link to entire sub-trees.
HIC
Hi Henric,
I have applied your suggestion and it is working 100% fine.
Now, when I used the fields automatically created by the hierarchy, within the pivot, with indent mode, is it possible to stop the expand functionality [+] when there is no more child?
Here is my related post:
I wish also to disable expand/collapse for dimension that I put in column, but I can't find any solution.
I noticed 2 ideas (related to this topic) have been posted on the forum. Quite hopeless to have this soon since they were posted in 2011...
No, unfortunately there is no way to stop the expand functionality. In principle, a collapsed node is a subtotal, and the expanded show the real values. What you want, is to allow subtotals in some positions in the chart, but not in others. And that is not possible.
HIC
Hi,
I have a situation where this is failing..
When I am selecting TerexUtilities both TerexUtilities and TerexUtilitiesUSDist are getting selected.
Please tell me how to handle this..