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 / Showing records that a...
Power Apps
Answered

Showing records that are NOT related (Many to Many)

(0) ShareShare
ReportReport
Posted on by 193

Hi all,

 

I have two tables (Table1 and Table2) with many-to-many relationship and am displaying each table as a gallery and have a third gallery showing the records of Table2 that are related to the selected record of Table1. What I want to do is in the gallery of Table2 records, I only want to show the items that are NOT related, so that the user can "move" Table2 records between a "related" gallery and a "not yet related" gallery.

 

Gallery.Selected.Table2 to show related records is easy, but how do I do that opposite?

 

Working with canvas app and Dataverse for Teams as datasource.

Categories:
I have the same question (0)
  • Verified answer
    MichelK Profile Picture
    120 on at

    Hello @cah2035 ,

     

    You could use the following expression:

    Filter( Table2, !(ID in Gallery.Selected.Table2.ID) )

    ID being the unique identifier of the record. 

    Of course this could very easily cause a Delegation problem, so you might need to gather your Table2 records in a collection.

     

    Let me know if this helps!

  • CAH2035 Profile Picture
    193 on at

    @MichelKThank you!

     

    It's true that I do get a delegation warning. Since I have using Dataverse as my data source though, and documentation says that Filter and Not are both delegable, I can just ignore that right? It won't matter for this instance anyway since I have only 20 or so records I am filtering, but just wondering.

  • MichelK Profile Picture
    120 on at

    @cah2035 it's true that Filter and Not are both delegable, however the in operator is not.

    To work around the matter, there are multiple possibilities depending on your case.
    In your case you're right that you don't need to worry about Delegation since you only have 20 records in the table.

     

    If you have a specific use case that you need to discuss, I'll be happy to answer any questions.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard