cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kaido20
Frequent Visitor

Filter Gallery if string in search box is in any of multiple columns

I am making a canvas app that filter the results based on text entered in a text box.

 

By default, PowerApps only searches one column, and only displays rows in the Gallery that starts with the term entered. But I want to display results that displays a dataset if a string appears anywhere in one of the columns defined by me.

 

I also have a SharePoint list with more than 1500 items.

 

Is this possible?

8 REPLIES 8
WarrenBelz
Super User
Super User

Hi @kaido20 ,

It would be good to supply your existing code, but I suspect you have a line something like

StartsWith(FieldName,ControlName.Text)

You need instead

ControlName.Text in FieldName

but note that this is not Delegable.

 

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.

Visit my blog Practical Power Apps

 

 

I've actually tried that, but I started running into a bug where some data simply disappear from the gallery, and I get a notice saying that the the query is not suitable for large data sets. 

Hi @kaido20 ,

That is not a bug - it is a Delegation warning (as per my note) as the in filter is not Delegable and will not work fully on data sets more than your (500-2000) Delegation limit. If you supply your code, I can answer this properly if you have other issues.

 

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.

Visit my blog Practical Power Apps

@WarrenBelz 

This is the code: 

 

SortByColumns(Filter([@Händlerliste]; TextSearchBox1.Text in 'Händler-Firmierung' || TextSearchBox1.Text in CC_Nr || TextSearchBox1.Text in 'Interesse an');"H_x00e4_ndler_x002d_Firmierung"; If(SortDescending1; Descending; Ascending))

 

So I am search across different fields

Hi @kaido20 ,

Assuming 'Händler-Firmierung'CC_Nr  and 'Interesse an' are all Text fields, the code is correct, however as I noted previously, this is not Delegable. 

 

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.

Visit my blog Practical Power Apps

kaido20
Frequent Visitor

@WarrenBelz any alternatives to make the code delegable?

@kaido20 ,

If there were, I would have provided it.  You cannot use Search or In a Delegable manner, so the only real option depending on the size of your data is to either pre-filter (a delegable filter that gets the returned numbers under your Delegation limit) make a big collection - which requires a bit more work (see my blog on this). Also if you read the top of the blog, Delegation is explained.

 

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.

Visit my blog Practical Power Apps

 

 

WarrenBelz
Super User
Super User

Hi @kaido20 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Visit my blog Practical Power Apps

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (1,949)