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 a gallery to...
Power Apps
Unanswered

Filtering a gallery to only those records that exist in a second table

(0) ShareShare
ReportReport
Posted on by 364

Hi all,

 

I have a gallery with about 800 records in. I would like this to be filtered to only show those records that exist in another table. If I do it as a label on each row of the gallery, I can get it to say "Present" or "not Present", depending on whether it exists or not, but I would like this to happen in the Items property, so the gallery just shows those are are "Not Present"?

Categories:
I have the same question (0)
  • victorcp Profile Picture
    2,350 Moderator on at

    Hi,

    You can add a column to the source of the gallery to check if it exists or not and then filter, like this:

    Filter(
     AddColumns(
     Source,
     "NewColumnName",
     If(
     Condition to check if exist in the other table,
     "Present",
     "Not Present"
     )
     ),
     NewColumnName = "Not Present"
    )

     

  • EpicTriffid Profile Picture
    364 on at

    Hi @victorcp , thank you, but I need to know how to then check the condition. I can't use ThisItem as i did in the gallery, I need it to essentially be EachItem, if that makes sense?

     

    Filter(
     AddColumns(
     '[dbo].[Support]',
     "Check",
     If(
     Not(Each Item in Support).Entry_ID in '[dbo].[StaffTotals]'[@Entry_ID],
     "Present",
     "Not Present"
     )
     ),
     Check = "Not Present"
    )
  • victorcp Profile Picture
    2,350 Moderator on at

    yes, but when we use filter we just need to pass the name of the column, so you function will be something like this:

    Filter(
     AddColumns(
     '[dbo].[Support]',
     "Check",
     If(
     Entry_ID in '[dbo].[StaffTotals]'[@Entry_ID],
     "Present",
     "Not Present"
     )
     ),
     Check = "Not Present"
    )

    Let me know if it worked

  • EpicTriffid Profile Picture
    364 on at

    Hi @victorcp 

     

    Unfortunately, it still doesn't work. Not only does it not return results, but it seems to freeze frequently, as if it is trying to pull back too much data or something. I can clearly see in my DB that there are only about 85 records that should appear though.

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard