Hello,
While working with one of the customer, I realized that getting a multi-level deep data to aggregate is not straightforward - for example, when you have projects with sub-projects (and they have their own sub-projects) and then projects have tasks and if you want a view where you can see all the tasks rolling up to root project
Projects Table
- First create
ProjectsTable - Create a
Lookupcolumn namedParent Projectpointing to same table i.eProjectstable
Tasks Table
- Create another table named
Tasks. - Create a
Lookupcolumn namedProjectand have it point toProjecttable.
and then create a another formulaic column Direct Tasks on project table with formula like =thisDocument.Tasks.filter(Project=thisRow)
This should give you basic Project <-> Tasks relationship and two tables.
Now lets say, if you want to create a column that gives you All tasks (i.e direct tasks + tasks of sub-projects) here is what you need to do.
-
Create a new column
PathonProjectTable - and set it toIF([Parent Project], [Parent Project].Path + '/' + thisRow.RowId(), thisRow.RowId())
What this does is for every project - it creates a path fromrootproject to current project. -
Create another column name
Children ProjectsonProjectand set it toProjects.Filter(Path.StartsWith(thisRow.Path))- this brings all the child projects where current project is in Path (i.e current project is one of the parent project) -
Create another column name
All Tasksand set it to[Children Projects].[Direct Tasks].FormulaMap(CurrentValue).ListCombine().Unique().BulletedList()
this goes through each of the children project and takes theirDirect Tasks(removes duplicates - as task on leaf project could appear in all the parent task list) - this should give you exactly what you are looking for as seen in below image

if you want to play with document, hereās a link.
Thank you.
