web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to get a List of r...
Power Apps
Answered

How to get a List of records which are not referenced in another Collection

(0) ShareShare
ReportReport
Posted on by 85

So i have two collections, where a collection1 may be referenced in collection2.  I want to get a new collection to know which of the records in collection 1 are not referenced in any of the records in collection 2.

 

I have tried to use the ForAll function like, but it fails.  I dont think I can use an If inside ForAll like this:

 

ForAll(
RenameColumns(
coll1,
"name",
"Coll1Name"
),
If (
CountRows(Filter(coll2,'Coll1 Name' = Coll1Name))=0,
Collect(
collNew,
LookUp(coll1, name=Coll1Name)
)
)
)
);

 

What would be the best method to achieve my goal here?

Categories:
  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @deg85 ,

    Assuming name is the matching field

    ClearCollect(
     collNew,
     Filter(
     coll1,
     !(name in coll2.name)
     )
    )

     

    Please click Accept as solution 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 Thumbs Up.

    Visit my blog Practical Power Apps

  • deg85 Profile Picture
    85 on at

    @WarrenBelz Thanks for your reply.  What if I wanted to compare guids?

  • Verified answer
    WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    @deg85 ,

    Assuming you had the GUID in both collections, just use that instead of name.

     

    Please click Accept as solution 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 Thumbs Up.

    Visit my blog Practical Power Apps

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @deg85 ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution 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 Thumbs Up.

    Visit my blog Practical Power Apps

  • deg85 Profile Picture
    85 on at

    thanks for your help, had forgotten to set the solution, so thanks for reminding me 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard