cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
panda
Helper I
Helper I

filter gallery from sharepoint list choice column

i am trying to create a filter on a gallery to filter on the values of the Status column from sharepoint list.

The sharepoint list column is named Status.  And the choices are "Awaiting Management Approval","Rejected", "Approved" in this column on the list.  

 

How do I create a filter on my powerapps gallery to filter for those words in the Status.

 

Example in the filter if I type "Approved" in the filter then the fields I created in the gallery will populate this information.  

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

I finally got it to work.  I filtered on the gallery as follows Filter(vltest, Status.Value=dropdown2.Selected.Result)

 

 

View solution in original post

12 REPLIES 12
ganeshsanap
Super User
Super User

@panda , Use below formula in items property of your Gallery:

 

Filter(SharePointListData, Status.Value = "Approved")

 

This will filter the items in gallery and shows only the items which has Status equal to Approved. If you want to filter the gallery items by using input text box then you can use Search for your gallery.


Please click Accept as solution if my post helped you solve your issue. This will help others find the correct solution easily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi Ganeshsanap. Thanks!  How do I use the search for my gallery so that I can search all 3?  

@panda , Use below formula in items property of your gallery if you have created your app starting with SharePoint Data:

 

SortByColumns(Filter([@SharePointListData], StartsWith(Status, TextSearchBox1.Text)), "Status", If(SortDescending1, Descending, Ascending))

 

Example:

Search Gallery.PNG

 


Please click Accept as solution if my post helped you solve your issue. This will help others find the correct solution easily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

statuslist.JPGpowerappstatus.jpg

 

It didn't work for me.  I'm not sure why.  It looks like the "Status" column isn't even a drop down on my powerapps.  I see the other 3 options per my screenshot.  

 

Also my formula got rid of all the data in my gallery.  

@panda, Try to replicate the same formula as given in my answer.  The function name I used is SortByColumns and not SearchByColumns.

Also, check and use the correct name of your Status field in formula.


Please click Accept as solution if my post helped you solve your issue. This will help others find the correct solution easily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

yashag2255
Dual Super User II
Dual Super User II

Hi @panda 

 

Based on the error in the screenshot,

1. Status Error can be resolved by replacing Status_Column1 from the name of Status column in SP list. In the screenshot, Status_Column1 is resolved as a control. 

2. SearchByColumns needs to be replaced with SortByColumns.

3. Do you have a sort button on the screen? If not, you can remove the If(SortDescending1,Descending, Ascending) and replace it with either Descending or Ascending based on the requirement.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

I still can't get this thing to work.  Please see my screenshots.  Not sure what I'm doing wrong.  I've been trying all day to get this to work.

 

statuslistsharepoint.JPGattempt2.JPGstatus.JPG

v-siky-msft
Community Support
Community Support

Hi @panda ,

 

Have your issue been resolved? If not, I'm happy to help further.

You just need to modify the Items property of Gallery as follows.

Filter('SP list Name', Status.Value=TextSearchBox1.Text)

Or

Filter(AddColumns('SP list Name',"TextStatus",Status.Value),StartsWith(TextStatus,TextSearchBox1.Text))

Hope this helps.

Sik

Hi Sik, 

 

No I still can't figure out how to make this work.  I have 3 choices to select and want all of the data to populate in the gallery depending on which status is chosen in the dropdown.  

 

 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,145)