cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

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
Highlighted
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
Highlighted
Resolver II
Resolver II

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.

Highlighted
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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,356)