Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
good morning,
i have a problem with list box selection in treeview mode.
in the Structure I have only a document and his full path(one document can have a different path level) but when i select a parent node no document selcted.
I attached a simply example to understand my problem.
can someone help me?
many thanks for you attention and have a good day
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:
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
You should learn about qv hierarchy: Hierarchies
thanks for the link
unfortunatly i don't find anithing that can help me.i find only example about static structure or strcture already right or structure with parent-child column.
many thanks for your attention
Yes, there has to be a child-parent relationship, if not existing in the desired format, you have to play in the script a bit to create one. Is your source data really like what you showed in inline table?
Yes, in my source data the value have the same structure that i put in inline table,
thanks a lot
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:
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
great!!!
works fine!
many thanks again and have a nice day!