Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

Find items of a collection inside other collection

(1) ShareShare
ReportReport
Posted on by 495
Hi All,
 
I have 2 collections:
 
colRFQSupplier
colRFQPO
 
And I need a result collection colRFQSupplierNotUsed (It means the values the values ​​in collection colRFQSupplier that do not exist in collection colRFQPO)
 
 
 
You can check with these sample values:
 
ClearCollect(colRFQSupplier, {RFQNumber: "RFQ100"},{RFQNumber: "RFQ102"},{RFQNumber: "RFQ103"},{RFQNumber: "RFQ104"},{RFQNumber: "RFQ105"},{RFQNumber: "RFQ106"} ,{RFQNumber: "RFQ107"} );
 
ClearCollect(colRFQPO, {RFQNumber: "RFQ101"},{RFQNumber: "RFQ104"});
 
ClearCollect(colRFQSupplierNotUsed,
    Filter(
        colRFQSupplier,
        IsBlank(
            LookUp(
                colRFQPO,
                RFQNumber = ThisRecord.RFQNumber
            )
        )
    )
);
 
The result is an empty values.
 
Thanks for any help!
  • CA1105 Profile Picture
    469 on at
    Find items of a collection inside other collection
    +1 point to @WarrenBelz sir answer.
  • WarrenBelz Profile Picture
    147,547 Most Valuable Professional on at
    Find items of a collection inside other collection
    Also this should work
    ClearCollect(
       colRFQSupplierNotUsed,
       Filter(
          colRFQSupplier,
          !(RFQNumber in colRFQPO.RFQNumber)
       )
    );
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
    Buy me a coffee
  • ronaldwalcott Profile Picture
    3,810 on at
    Find items of a collection inside other collection
    Here is a weird approach which should lay the groundwork for performing unions and intersections.
     
    ClearCollect(
        colRFQSupplier,
        {RFQNumber: "RFQ100"},
        {RFQNumber: "RFQ102"},
        {RFQNumber: "RFQ103"},
        {RFQNumber: "RFQ104"},
        {RFQNumber: "RFQ105"},
        {RFQNumber: "RFQ106"},
        {RFQNumber: "RFQ107"}
    );
    ClearCollect(
        colRFQPO,
        {RFQNumber: "RFQ101"},
        {RFQNumber: "RFQ104"},
        {RFQNumber: "RFQ103"}
    );
    ClearCollect(
        colCombined,
        AddColumns(
            colRFQSupplier,
            CollectionColumn,
            1
        ),
        AddColumns(
            colRFQPO,
            CollectionColumn,
            2
        )
    );
    ClearCollect(
        colRFQSupplierNotUsed1,
        Filter(
            GroupBy(
                colCombined,
                RFQNumber,
                GroupData
            ),
            CountRows(GroupData) = 1
        )
    );
    ClearCollect(
        colRFQSupplierNotUsed2,
        ShowColumns(
            Filter(
                colRFQSupplierNotUsed1,
                First(GroupData).CollectionColumn = 1
            ),
            RFQNumber
        )
    );
  • Suggested answer
    Rajkumar_M Profile Picture
    3,685 Super User 2025 Season 1 on at
    Find items of a collection inside other collection
     
    Instead of IsBlank(LookUp(...)), use !IsBlank(...) properly, or better yet, use ! (not) and LookUp to check if no match exists.
     
    ClearCollect(
        colRFQSupplierNotUsed,
        Filter(
            colRFQSupplier,
            IsEmpty(
                Filter(
                    colRFQPO,
                    RFQNumber = ThisRecord.RFQNumber
                )
            )
        )
    )

     
    Thanks!
     
    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >