Hi there,
I would like to create lists of database objects that have references to other objects of the same type. Is there a way to create such lists dynamically and add them to repeating groups as data source.
Let me give you an example: genealogy. I do have a User data type. Each user has the fields parents (list of User) and children (list of User). You can see an example in the screenshot.
Each user can have multiple parents and children. I would like to create a list of Users that starts with one parent (or maybe at given level of a tree). See the screenshot as example. I would like to render a list that starts at level zero (Jane and John are part of the list) or at the User Jane (only Jane is part of the list). The list should include all children and their children and their children and so on…
So, my questions would be:
-
Is it possible to create such a dynamic list (and how)? Basically, I want to iterate recursively over a tree.
-
Is it possible to render some kind of repeating group that looks like the painted screenshot?
Thanks very much,
Marco