Hello Dojo,
So we currently have an EPM system where there are 3 levels of the topology that are related through many to many relations. The issue we are encountering is that the aggregation action syntax is dependent on a GroupBy Idx that has the PK to the table that will receive the aggregated result. But these many to many relations do not have a FK relation in their table, instead the relation is satisfied through an intermediary table that has a FK of both entities in a row.
So is there a way to use the aggregation action to perform these calculations using this many to many structure? Or is it only able to be done when it is a one to many or one to one relation?
Hi,
This is not possible what you're currently trying to achieve.
An aggregate action needs to have a "groupby" column on which to group the results on and this will be the resulting primary key in the destination column. Aggregate actions don't rely on relations or foreignkey columns. Only exception is a recursive table (row pointing to another row of the same table) where you want perform an aggregation on.
If you know that the child table will only have one parent then you could add an extra column in the child table to perform the "groupby" on so the result gets into the parent. Or go a level deeper in the topology if that level would have only one (grand)parent and start the aggregation from there (e.g. Node (child) could be linked to multiple downstream groups (parent), but a cable modem (grandchild) is linked to one downstream group (grandparent)) -> aggregate from cable modem to node and aggregate from cable modem to downstream group as aggregating from node to downstream group is not directly possible.
If that isn't possible (child could have many parents, no direct link between grandchild and grandparent) then you'll probably need to perform the calculation yourself in a QAction.