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 / Filter Gallery Based O...
Power Apps
Answered

Filter Gallery Based On Field Value

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have a scenario in which I have 3 seperate galleries on one page (see below). 1 gallery is to show Pending, 1 to show Rejected and 1 to show Approved requests. I have a SharePoint list with a Request Status column also which is a 'Choice' field with options of Pending, Rejected and Approved. 

 

I am trying to make a filter for each gallery to show to respective requests as demonstrated below. Can anyone advise of the logic for the filter? 

 

Leave Gallery.JPG

 

Thanks

 

Craig

Categories:
I have the same question (0)
  • strategery Profile Picture
    179 on at

    When you initially create the gallery you choose the datasource. I'll assume you've already done that, and I will attempt to fill in some blanks by assuming what you want to show is something like an employee name?

     

    Assume your Sharepoint list is named "SharePointList",

    assume you have a column in the list for "Name" which is what you wish to show in the gallery,

    and the column you've already mentioned "Request Status".

     

    Select the gallery, change the "Items" to be this for "Pending" as an example:

    Filter(SharePointList,'Request Status'="Pending").Name

     

    "Filter" gives all records with Request Status = Pending, add .Name at the end so the gallery knows which field you wish to display.

  • Verified answer
    Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    In the Items property of each of the galleries try this:

     

    Filter([SP Data Source], RequestStatus.Value = "Pending") - change the status value for each of the galleries

     

    Now this may not be the best solution because you will get a blue dot indicating that this function can't be delegated. Choice columns can't be delegated in SharePoint, so it will only be able to run against the first 500 records and you will probably take a little performance hit.

     

     

  • Scott0044 Profile Picture
    137 on at

    @Jeff_Thorpe wrote:

    Filter([SP Data Source], RequestStatus.Value = "Pending")

    Wonderful!  Thanks for this!  I'm trying to get this to work with my original 'Items' code that sorts the gallery by created date.  And allows the search of a few fields.  But I can't figure out how to inject your code to get everything packaged together neatly.  Any insight?  TIA  

     

    SortByColumns(Filter(Tickets, TextSearchBox1.Text in 'Assigned To'.DisplayName || TextSearchBox1.Text in Details || TextSearchBox1.Text in 'Created by'.DisplayName), "Created", If(SortDescending1, Descending,Ascending))

     

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