cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Search/filter function in Powerapps - SharePoint list

Hi,

 

I am trying to implement a custom search/filter function in Powerapps, which has SharePoint list as datasource. I am trying to achieve something similar as in below screenshot. I tried, but couldn't achieve something similar as below. Any technical advice would be helpful. Thanks.

Pic1.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hey @Kumar9024021 

 

This is not showing any results because Sort is used to sort the item on a key in either ascending order or descending order.

If you want to filter the results, please use the below expression on the Items property of the gallery:

Filter(Collection1,Status="Approved")

If you want to sort this,

Sort(Filter(Collection1,Status="Approved"),ColumnName, "Ascending")

Please mark this thread as closed if you are following the other thread on: https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Gallery-shows-empty-results-eventho... 

 

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!

View solution in original post

8 REPLIES 8
Highlighted
Helper I
Helper I

Hi @Kumar9024021 

 

Could you provide more details about what you have tried and how it is not working? 

 

I can see potential issues in here with searching on dates. I have not been able to find a way to filter on dates using SharePoint Date columns as this has caused the query to be non-delegable as a Date is a complex data type. I have instead created an additional Number type column where I store the date as a number in format yyyymmdd which enables you to filter, sort and search on it and the query is delegable to the data source.

Highlighted

Hi @AnneZC /All,

 

I tried adding a gallery and in the Items property used Search/filter functionality to populate records. It just displays the entire resultset.

 

I want the functionality similar as in below screenshot. Any technical advice would be helpful on achieving it. Thanks.

 

 

Highlighted

Please share your Search or Filter formula that you are using. That will help in giving you the right suggestion.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://thepoweraddict.com
Highlighted

Hi @PowerAddict 

 

In the OnStart, I created a collection to populate the entire SharePoint list.

 

ClearCollect(Collection1,''SPListName')

 

In the Gallery, Items property I added below code

 

Sort(Collection1,Status="Approved")

 

It doesn't  show anything. May I know how to add the labels and then populate all individual field from SPList , similar as in below screenshot and then implement Search functionality on Search button click.

 

Pic1.PNG

 

 

Highlighted

Just to make sure there are no obvious errors, what does your collection look like when you go to View->Collections->Collection1.
OR
When you set the items property of the gallery to just Collection1, do you see any data in the gallery?

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://www.thepoweraddict.com
Highlighted

Hi @Kumar9024021 

There's quite a bit to creating a search/filter using multiple columns. I would suggest some videos for you to gain some understanding of the details of using the Search and Filter functions:

https://www.youtube.com/watch?v=nlhWQg03TL0

https://www.youtube.com/watch?v=FaTnOOc34os

 

And another area that you need to gain an understanding of to create a complex search/filter feature  that will scale beyond a data set of 2000 records is Delegation https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview

 

 

Highlighted

Hi @PowerAddict ,

 

Collection is populated successfully as per below screenshot. However when i populate Gallery with the collection, the moderator screen shows empty gallery. When I play the moderator screen, may i know why i am unable to see gallery data ? Should we attach the moderator screen with gallery ?

 

Pic4.PNGPic5.PNG

Highlighted

Hey @Kumar9024021 

 

This is not showing any results because Sort is used to sort the item on a key in either ascending order or descending order.

If you want to filter the results, please use the below expression on the Items property of the gallery:

Filter(Collection1,Status="Approved")

If you want to sort this,

Sort(Filter(Collection1,Status="Approved"),ColumnName, "Ascending")

Please mark this thread as closed if you are following the other thread on: https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Gallery-shows-empty-results-eventho... 

 

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!

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (2,604)