Hello, I have recently set up a hierarchy for accounting codes using the attached table and the following Load Script:
HIERARCHY(Code, Parent, Node_Name, ParentName, Node_Name, Path, '|')
LOAD Code, Parent, Node_Name
(ooxml, embedded labels, table is Sheet1);
One of the issues that I am having is with how the listbox is behaving with selections on collapsed and expanded nodes.
The above screenshots demonstrate what I am referring to. If I start with all of the nodes collapsed and select 200 and expand, all of its children are also selected. This is the behavior that I prefer. But if I expand the 200 node and select it, now only 200 is selected.
Is there any way that I can get it to have the same behavior when the node is expanded as to when it is collapsed?
So I added the following Select in Field trigger to the Path field: ='("' & concat(DISTINCT Path, '*","') & '*")'
It now gives me the opposite of my initial issue. Now when I select an expanded node, it selects each child node. But if I select the collapsed node, it doesn't select at all. I've attached the qvw I've been using as an example.
You can use the Path field to select, as it should be more unique than the individual node (parent in this case) to select
100 - Instruction|200 - Support Services
The hierarchy is behaving as I would expect: if collapsed, the whole node and its leaves are selected, but if expanded, only the individual node is selected.
I guess I'm confused what you mean by use the Path field to select because I think I'm already doing that. I have the Path field in the listbox to get the tree view and I am selecting on the Path field in the trigger.
While that may be the expected behavior in some cases, I need the children to be selected as well. Basically, the 200 code is a grouping of the other 200 level accounting codes and shouldn't have any aggregate data. So when I select 200 on the tree view I would expect that all of its children are included as well. Essentially my data should only have dollar amounts at the lowest level of detail, and selecting a higher level of detail should provide you with a sum of all of the children.
Nevermind, the trigger did in fact work, but I was experience issues using ',' in the concat statement. When I switched it with '|' it worked fine.