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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

"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:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 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,297 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard