Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Unexpected behavior for listbox shown as Treeview

Hello,

I have the following hierarchy:

PathNodeNodeIdParentId
AAAAAA1
AAA>BBBB21
AAA>BB>CC32
AAA>CCCC41

I displayed in a listbox with the option

Listbox.png

But then when I click on the first node 'AAA', the selection is different whether the node is collapsed or expand.

When Collapsed:

Listbox-Collapsed.png

When Expanded:

Listbox-Expanded.png

I understand the concept, but how to force the selection of "sub node" when the selected node is expanded?

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

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 

View solution in original post

5 Replies
Nicole-Smith

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.

hic
Former Employee
Former Employee

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 

Not applicable
Author

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:

Pivot - Indent &amp; Expand

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...

http://community.qlik.com/ideas/1972

http://community.qlik.com/ideas/2170

hic
Former Employee
Former Employee

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

agni_gold
Specialist III
Specialist III

Hi,

I have a situation where this is failing..

xcv.jpg

When I am selecting TerexUtilities both TerexUtilities and TerexUtilitiesUSDist are getting selected.

Please tell me how to handle this..