Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
kmswetha
Creator
Creator

Tree View list box

Hi,

Am using tree view by using hierarchy function.Everything is coming up well.

But when I want to put it in list box everything turns out to be gray.Is there any specific reason for this?

1 Solution

Accepted Solutions
MarcoWedel

Hi,

to add all nodes as separate values to a field and thus make all levels selectable in a treeview listbox, you could do like:

create a list box as TreeView having only complete dinamic path of a document

Hi,

to be able to select nodes by their parents, those have to have rows of their own in the hierarchy field.

So one solution could be:

QlikCommunity_Thread_133098_Pic1.JPG.jpg

QlikCommunity_Thread_133098_Pic2.JPG.jpg

TTREE:

LOAD * INLINE

[DOC,PATH,DESCRIPTION

doc1, B/B0/B00/B00001,DESC 1

doc2, B/B0/B00/B00002,DESC 2

doc3, B/B0/B00/B00003,DESC 3

doc4, B/B0/B01/B01001,DESC 4

doc5, B/B0/B01/B01001/B010001,DESC 5

doc6, A/A0/A00/A00001,DESC 6

doc7, A/A0/A00/A00002,DESC 7

doc8, A/A0/A00/A00002,DESC 8

];

LOAD PATH,

    Left(PATH,Index(PATH&'/','/',IterNo())-1) as PATH_SELECT

Resident TTREE

While IterNo()<=SubStringCount(PATH,'/')+1;

hope this helps

regards

Marco

View solution in original post

10 Replies
avinashelite

I think you have made some selection in the dashboard for which the tree view does not have any associated data for it hence its showing it as grey.

kmswetha
Creator
Creator
Author

Hi Abinash,

I too thought the same but this is same even after clearing all the selections.

If we expand all, only the last level which as data turns to be white but not the associate higher level.

Not applicable

Can you post up an example application of what you are seeing. Sounds like you might just have the bottom level row of data only and not any of the cascades you need to make the other levels selectable.

Little example is attached, see how you need the extra rows.

hope that helps

Joe

MarcoWedel

Hi,

to add all nodes as separate values to a field and thus make all levels selectable in a treeview listbox, you could do like:

create a list box as TreeView having only complete dinamic path of a document

Hi,

to be able to select nodes by their parents, those have to have rows of their own in the hierarchy field.

So one solution could be:

QlikCommunity_Thread_133098_Pic1.JPG.jpg

QlikCommunity_Thread_133098_Pic2.JPG.jpg

TTREE:

LOAD * INLINE

[DOC,PATH,DESCRIPTION

doc1, B/B0/B00/B00001,DESC 1

doc2, B/B0/B00/B00002,DESC 2

doc3, B/B0/B00/B00003,DESC 3

doc4, B/B0/B01/B01001,DESC 4

doc5, B/B0/B01/B01001/B010001,DESC 5

doc6, A/A0/A00/A00001,DESC 6

doc7, A/A0/A00/A00002,DESC 7

doc8, A/A0/A00/A00002,DESC 8

];

LOAD PATH,

    Left(PATH,Index(PATH&'/','/',IterNo())-1) as PATH_SELECT

Resident TTREE

While IterNo()<=SubStringCount(PATH,'/')+1;

hope this helps

regards

Marco

kmswetha
Creator
Creator
Author

Hi Joe,

My fact has data only at last level and it eventually groups based on the hierarchy.

If I don't select anything entire list box would be white, the moment I select date it turns out to be gray and only the last level in hierarchy turns white where ever data resides.

but Ideally if lower node has data and which in white, higher node should also be white rather than turning out to be gray?

Any suggestions would be appreciated?

Not applicable

Post up an example, it would be easier to help then

avinashelite

can you please post the app.

kmswetha
Creator
Creator
Author

Hi Avinash/Joe,

Attached example has multi dimensions, when region is selected only the last level turns to be in white because of the association but not the related higher level.

kmswetha
Creator
Creator
Author

Hi Macro,

This is correct, but can you take some time out and explain the logic behind this.

Regards,

Swetha