cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Responsive Resident
Responsive Resident

Search Box for Gallery Based on Multiple Columns

Hello Everyone,

I have an App based on SharePoint List (Name: Departments) which is only having three columns with information like below.

Title (Single Line Text)Email (Single Line Text)Role (Choice) 
User 1User1@email.com

IT

User 2User2@email.com

Sales

User 3User3@email.comPurchase

In the PowerApps Application i have added a gallery. I have added a text input box and i want that the gallery should be filtered to the any entered criteria from the above demo list. For Example, i may type User 1 then i should all items for User 1, if i enter IT then i should get all the users from IT and so on. When the field is blank i should get all the items in the gallery. I came to know that 'Search' having some limitations and i tried using filter as below code but it is not working. 

 

Filter(Departments, FilterBox.Text in Title)

 

** The list will be having only 200 records max, hence the delegation warning can be ignored. Can anyone please help how to achieve this?

Many Thanks,

Akshay 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User III
Super User III

Hi @AkshayManke ,

If you will always have list numbers under your Delegation limit and want to get rid of the warning (as well as achieve what you need) try this (NOTE if the list numbers are over your limit it will only work for that number and you will not get a warning)

With(
   {wDept:Departments},  
   Filter(
      wDept, 
      If(
         IsBlank(FilterBox.Text),
         true,
         FilterBox.Text in Title || 
         FilterBox.Text in Email ||
         FilterBox.Text in Role.Value
      )
   )
)

 

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.

View solution in original post

Hi @AkshayManke ,

The in Filter is not Delegable (nor is Search), hence the restriction you have.  The With() statement does nothing more than "collect" the items (subject to the delegation limit) before the filter, so the subsequent statement is Delegable.

There are a couple of approaches - I have done a blog on Delegation and the "big collection" item may be a path and also in a related one on using the With() statement to manage Delegation the the item at the end (which I use regularly) will collect up to 4,000 items (including those matching a delegable filter).

 

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.

 

View solution in original post

3 REPLIES 3
Super User III
Super User III

Hi @AkshayManke ,

If you will always have list numbers under your Delegation limit and want to get rid of the warning (as well as achieve what you need) try this (NOTE if the list numbers are over your limit it will only work for that number and you will not get a warning)

With(
   {wDept:Departments},  
   Filter(
      wDept, 
      If(
         IsBlank(FilterBox.Text),
         true,
         FilterBox.Text in Title || 
         FilterBox.Text in Email ||
         FilterBox.Text in Role.Value
      )
   )
)

 

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.

View solution in original post

Hello @WarrenBelz,

 

I tried your solution and it worked exactly as expected. Many Thanks for the help on this.

 

Just a question: Which approach/code i should use if the items are going to increase than the limit?

 

Regards,

Akshay

Hi @AkshayManke ,

The in Filter is not Delegable (nor is Search), hence the restriction you have.  The With() statement does nothing more than "collect" the items (subject to the delegation limit) before the filter, so the subsequent statement is Delegable.

There are a couple of approaches - I have done a blog on Delegation and the "big collection" item may be a path and also in a related one on using the With() statement to manage Delegation the the item at the end (which I use regularly) will collect up to 4,000 items (including those matching a delegable filter).

 

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.

 

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,199)