DMS in Appfarm (follow-up)

Hi everyone!

I am in the midst of implementing a DMS. Right now we have something in place with the help of the suggestions in this post (DMS in appfarm (Document Management System)).

However, I have a use case where on clicking a parent, I want to hide all the children/grandchildren/great-grandchildren and so forth, however many levels are present. It is straightforward enough to do it for children, but how would I go about doing it recursively for the deeper levels?

Thank you!


I believe you have seen the recursive tree feature? If you want to toggle all direct children of clicked item (i.e. object in context) collapsed, you may update all objects having object in context as parent. If you want to toggle a more advanced selection - see if the context parameter “iteration level” might help.

Hi! thanks for the update. I have no issues hiding the direct children. But I need to hide all of the descendants, not just the direct children. Any ideas on how I could do so?

@kristian @rhys Hi, would you have any thoughts on this? Would appreciate any input you have.

I’m thinking one of the following, depending on the desired behaviour.

a) If you have a list of Categories, with a “indefinite” set of Subcategories. When clicking the “Collapse” button on Subcategory 1.1 → Save the Context Parameter Recursion level as a runtime property (e.g. Selected recusion level). On the container for the row/category, make it Visible only if the Recursion level for that object is greater than or equal Selected recursion level
b) Having a runtime property for all Categories (e.g. “Is Hidden”), perform an advanced Update Object when selecting the parent. You may update all Categories and set the “Is Hidden” flag with a Function where you add categories (all) as a function parameter as well as the ID of the object in context, and perform a depth-first search to evaluate if that Category should be hidden.
c) Same as B, but with a while-loop propagating from the parent, down the “tree” to set all children and grandchildren hidden until the whole familiy is hidden.

1 Like