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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering records that...
Power Apps
Answered

Filtering records that are NOT in another table and showing in gallery

(0) ShareShare
ReportReport
Posted on by 182

Need a bit of help here.  I have a gallery that displays some master records, say like Customers.  The user can click on a customer record and it will bring up any orders for that customer and those are listed in a second gallery.  I have a third gallery that needs to display items that the customer did NOT order.  So say the customer is #100.  They two orders, 1001, 1002.  The inventory list is A, B, C, D, E.  For order 1001 they ordered items A, C, E.  For order 1002 they ordered A, B, C, D and E.  So what I need is this third gallery to show items B and D if the first order (1001) is selected.  If order 1002 is selected then it would not display any records because all five items are in the order.  Hope this makes some sense.  That third gallery is meant to show exceptions so if it's items are missing from another table (the order table) then they will be listed.

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @guyinkalamazoo 

    With the proviso that the table in question does not contain more than 2k items, (under the delegation limit), you can do something like this:

    With(
             {finv: ItemsPropertyfrom Gallery2},
      Filter(
               InventoryList, !(ID in finv.ID)
      )
    )

    The With() formula creates a table that is the same as your gallery2 and then filters the inventory list against the Items that have been previously selected.  Because the "Not" and "in" operators are used in this formula, delegation limits will apply so your inventory list cannot exceed 2k items. 

  • guyinkalamazoo Profile Picture
    182 on at

    And yes, the table would contain under 2K.  And thanks for this information!  

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard