Copy children from multiple parents and remove duplicates

Hello dear community,

I'm looking for advice on the best ways to approach the following:

I have a Tasks table, containing children tables Orders and this contains OrdersDetails (grandchildren)

I want to build another children table, EverythingInOnePlace table, that will contain all of the OrderDetails grandchildren rows from the same Task.

I tried the action of a set of rows, but I can't figure out the proper select formula so I will copy grandchildren without duplicates (same product in OrderDetails can be found in different Orders).

I thought I'll ise the TRUE in select(), but I found that in action on a set of rows I must use the RowKey column, which is not the same with my Product column.

So far I got to this, but with repeating products copied

select(DetaliiPVSPD[idDetaliu];and([idPVSPD].[idlot].[x4]=[_THISROW].[idtask];or([Operatiune]="post Service";[Operatiune]="Livrare"););

FALSE) (I actually have grand grand children,but i tried to simplify my case description)

I am thinking that this approach might not be the best way for my target result.

Thank you for your ideas

0 5 146
5 REPLIES 5