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.
Solved! Go to Solution.
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!
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.
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.
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.
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
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 ?
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!
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
User | Count |
---|---|
256 | |
215 | |
76 | |
38 | |
33 |
User | Count |
---|---|
329 | |
222 | |
124 | |
71 | |
54 |