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 Platform Community / Forums / Power Apps / Add search to filtered...
Power Apps
Answered

Add search to filtered gallery

(0) ShareShare
ReportReport
Posted on by 22

Hi,

I have a list that gets filtered based on the logged in user and other criteria.

This is the current filter and sort function I have for my gallery:

 

 

 

Sort(Filter('UpgrClean_Archive_Allocated 20220214',TSR=varTSR, TSRSubmitted=false),Modified,Ascending)

 

 

 

However, my users would like to be able to search for specific items in the list, as the lists are quite large.

 

I've created a search box and set it up.

 

I'm having difficulty integrating it into my already filtered gallery.

 

I've tried adding this to my current code using the StartsWith function:

 

 

Sort(Filter('UpgrClean_Archive_Allocated 20220214',TSR=varTSR, TSRSubmitted=false,StartsWith(PolicyID,SearchPolicy.Text)),Modified,Ascending)

 

 

 

I have two problems with this:

1. I'm getting a delegation error (after I've just managed to get rid of all other delegation errors in my app!)

2. If the search field is left blank, I want it to show all items in the gallery. I understand that the 'StartsWith' function is therefore not going to work.

 

My brain is fried; please help. 🙂

Categories:
I have the same question (0)
  • Verified answer
    PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at

    @nicolaasvdw instead of StartsWith you could use

     

    PolicyID = SearchPolicy.Text || IsBlank(SearchPolicy.Text)

     

    So this would either get an exact Match of the PolicyID or if the Search field is empty it would Grab all items instead.

     

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

  • nicolaasvdw Profile Picture
    22 on at

    This is it! Thanks for the quick response. It works perfectly.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard