cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CraigFeg
Level: Powered On

Filter Gallery Based On Field Value

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

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Filter Gallery Based On Field Value

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.

 

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
strategery
Level 8

Re: Filter Gallery Based On Field Value

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.

Super User
Super User

Re: Filter Gallery Based On Field Value

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.

 

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 91 members 3,026 guests
Please welcome our newest community members: