web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

"Advance Search"

(0) ShareShare
ReportReport
Posted on by 36

Good afternoon everyone. 

 

I currently have an app with a gallery that is linked to a SharePoint list. I have ordered the list in descending order so the most recent entries appear at the top of the gallery. I currently have a text input box which allows the users to search a number of columns. This is the formula I am using and it works great.

 

Search(Sort('SPList','Column1',Descending), Searchbox.Text,"Column2", "Column3", "Column4")

 

I would like to add an "Advanced search" capability so that users can filter using several dropdown options (based on status of the item i.e open, closed, pending) as well as the text input. I must also retain the sort function so only the most recent items appear and are searched. 

 

I have figured out how to perform the advance search on it's own but I need it to work alongside the sort function too and this is where I am coming unstuck. 

 

Any suggestions are greatly welcomed. 

 

Thank you 

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Steffijeff 

    You simply need to put your criteria inside the formula you have.

    Sort(
     Search(
     Filter('SPList', creiteriaForFiltering),
     Searchbox.Text,"Column2", "Column3", "Column4"
     ),
     'Column1',
     Descending
    )

     

    I hope this is helpful for you.

  • Steffijeff Profile Picture
    36 on at

    Hi @RandyHayes 

     

    Thank you, sorry, I don't think I was clear enough. What your solution is doing is applying the filters first and then sorting the results in descending order. What I need is to sort the SharePoint List so only the most recent entries are pulled through  to my app and the filters are then applied to those. 

     

    In essence, I'm looking for a way around the 2000 items limit. But every solution I've tried so far applies the filters to the first 2000 items in my list, not the most recent 2000 items.

     

    Thanks

    Steph

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Steffijeff 

    You can shuffle around the functions any way that you need.

    If you are looking for the most recent 2000 items, then move your sort into the middle.

    Sort(
     Search(
     Filter(
     Sort('SPList', Created, Descending),
     criteriaForFiltering
     ),
     Searchbox.Text,"Column2", "Column3", "Column4"
     ),
     'Column1',
     Descending
    )

    They can be shuffled any way that helps achieve what you need.

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard