Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 345

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:
  • EpicTriffid Profile Picture
    345 on at
    Re: Filtering a gallery to only those records that exist in a second table

    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.

  • victorcp Profile Picture
    2,347 Super User 2025 Season 1 on at
    Re: Filtering a gallery to only those records that exist in a second table

    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
    345 on at
    Re: Filtering a gallery to only those records that exist in a second table

    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,347 Super User 2025 Season 1 on at
    Re: Filtering a gallery to only those records that exist in a second table

    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"
    )

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard