Hierachy Tree - Repeater Based

Hi all,

I’m working on some kinda ‘hierachy tree’ with repeater, and just got some troubles.
Firstly, have a look at my work.

Just as like on the right-hand side, I wanna hide the fold-unfold button unless the item which it belongs to has any children.
In addition, I also want to reveal the number of children that parent items have with their label.
It would be greatly appreciated if someone could solve this problem for me :slight_smile:

hierachy_tree.rp (65.7 KB)


Hi, i did an easy sample for it, but it’s not smart enough.

hierachy_tree_with_children.rp (85.1 KB)

I added a new column named “category” to the repeater and prepare a temp widget named “children_amount”. (You can use global variable instead)

All interations of repeater (like “Add / Remove Filter”, “Update Rows”) will trigger OnItemLoad, so we need to put a “Wait” interation between them to get the itemCount after each filter. And i saved the amount in “children_amount”, then i update the value of menu_cell like “item.name(children_amount)”.

At last, when repeater run OnItemLoad, there are conditions “IF text on menu_cell contains ‘(’ and ‘)’” to figure out which one should show the image.

Hope this will help you.

1 Like

Wow, thanks!
I’m inspired by your solution, though it was a little far from the way I expected.
Now I get that it is not that easy to count the number of specific items after the items are loaded.
Thank you!

I just had the same requirement as you. There is no way to make parent-child relationship in each repeater items and it’s hard to control specific items cause there are no search method in repeater. The only way to set the target item is using Marked Row.

Really need a search method such as “find item by column name” or something like this :joy:

I totally agree with you.
Repeater is pretty useful in many ways already, still can be more powerful once it provides some methods to get access to specific items.
Marker is nice but not enough to get a full control of those items.