Hi!
I'm trying to create a collection from two SP lists. The two lists share a somewhat mutual column, however the second list is an "expanded" version of the first list. To simplify, see the two list examples:


I want to create a "merged" collection which will look something like this: (omit blanks and collect items with Status="Active")

I tried the following, but it's incorrect:
//Collect the columns I need from ListA
ClearCollect(colA, ShowColumns(Filter(ListA, Status="Active" && !IsBlank(ReqNrA)), "ID", "ReqNrA", "Status"));
//Collect the columns I need from ListB
ClearCollect(colB, ShowColumns(Filter(ListB, !IsBlank(ReqNrB)), "ID", "ReqNrB", "Description"));
//Merge columns
ClearCollect(
colMerge,
Collect(
RenameColumns(AddColumns(
colA,
"ReqNr",
LookUp(colB,ReqNrB=colA.ReqNrA,ReqNrB)
),
"ID","ListAid"
),
RenameColumns(
Filter(colB, Not(ReqNrA in colB.ReqNrB)),
"ID", "ListBid"
)
)
)
Thanks 🙂