Displaying data tree with different entity types

Hello!

I wonder if someone could give me a little advice concerning an onscreen tree structure I’m trying to build.

I’m working with the following data structure.

b5b2c3f7

How would I go about this?

I though that I could do it as a group table if I used joins to build the data source.

select mp.processName, ms.name as stageName, mt.name as taskName,
assgn.dateAssigned, assgn.estimatedCompletionDate,
assgn.actualCompletionDate, assgn.completionStatus
from peer$Process mp
left join mp.Stages ms
left join ms.Tasks mt
left join mt.assignments assgn

And this nearly works, except that the table shows blank lines where the query returns null when the join doesn’t produce a result. So I don’t think this is the way to do it.

Hello @ray1

Could you describe what blank lines are you talking about? It’ll be more clear if you share a screenshot.

And if you want to display some hierarchy with different entities it is more suitable to use WidgetsTree component. An example can be found here: link.

Regards,
Daniil.

Hi yes. Here’s what I’m looking at:

00

Now, I think the problem is because I’m joining the data using a left join, which means that the data returned will be null if a record to join is not found. It also means that numbers in brackets are incorrect too.

Since all I’m looking for is a way to make sure that the parent records are shown in the table, eve if it has no child records, I think I’m going about it the wrong way.

I had a look at the WidgetTree, but it looks as if this needs a hierarchical data source, which would involve having a base entity and pointing it at itself.

I was thinking then that I might need a TreeTable rather than a group table. If I derived my process, stage, task and assignment from a base entity, and use the base entity as the basis for the Hierarchical datasource, then that might work.

d0ed9fac

Okay, I think this is a lot of work for a nice bit of UI. I’m going to abandon it.

Yes, your case is not trivial - it’s a bit tricky to show hierarchy UI without hierarchy in entities relationship. Unfortunately there is no fast and easy way to do it.