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 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

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard