Group by view

Hello again.

I’m looking for a solution to create a group by view, such as this:

It’s to create a view for managers who work on a per client basis, who have more than one company. The Blue row would be the CEO and the white line would be the company under their name. I have everything else mostly built but this is the most crucial part. Has anyone come across this or has any ideas on how to build it?

Update — what I’ve already ruled out, in case it saves anyone time:

  1. Table block has no Group By. I checked the served bundle: groupBy only
    appears as a lodash helper for icon lists, never in a table-block context.

  2. Sub-table column (DisplaySubTableFieldModel + subTableColumns) renders the
    correct number of child rows but no columns — only row indices and the
    pager. The subTableColumnSettings init does if (!collectionField) return,
    and I could not get collectionField to resolve. There is no configured
    sub-table anywhere in my instance to copy the shape from.

  3. treeTable on a Postgres VIEW: setting template: 'tree' + tree: 'adjacencyList' on a view is accepted and it unhides Expand/Collapse, but
    it does not give the nesting mechanics — ?tree=true returns all rows flat
    with no nested children; children only come via ?appends=children, and
    appends is added by a column flow, not by tree mode. My guess is that the
    closure table main_<collection>_path is what actually does the nesting,
    and a view cannot have one.

So: is there a supported way to get parent/child rows in one table block
without making the source collection a real tree table? Or is a separate
physical tree table, refreshed from the source, the intended approach?

NocoBase 2.1.39 CE, Modern (v2) pages, Postgres 16.

Best Regards

Hello, I suggest using AI employees + JS BlocK to implement this.