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

Filter more than 10K records from SQL

Hi all, I'm trying to filter a SQL table using Gallery Control on an integer column. I'm unable to retrieve more than 2K records into canvas app and filtering records after 2K is not working, since my local cache holds 2K only. Please suggest me how can this be avoided...

 

Search(tblName, txtInput.Text, "order_ number")

 

order_number is a primary key and integer.

 

Thanks in advance.

 

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @krishnags ,

Your issue here is that Search() is not Delegable - you can use StartsWith() if that suits.

UPDATE: must have missed SQL - it is 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

RandyHayes
Super User
Super User

@krishnags 

As mentioned, Search is not delegable.  But even more so, it is not needed in your scenario.  If Order_number is an integer, then your formula should only be the following:

Filter(tblName, order_ number = Value(txtInput.Text))

Using Search and StartsWith would only be relevant to text columns in your table.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
timl
Super User
Super User

@krishnags 

The formula that @RandyHayes suggests will work, and is delegable.

But as a point of clarification, the Search function IS delegable with SQL Server - I use it all the time.

 

If you intended to call Search because you want to carry out a partial numeric search on order_number, the answer here is to create a SQL view that casts order_number to a varchar datatype, and to call Search on the view.

timl_0-1643322810847.png

 

 

RandyHayes
Super User
Super User

@krishnags 

Just to be clear on @timl 's statement - it is delegable for Text, not for numbers.  So the conversion mentioned would be needed at the SQL level (to a view).

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,343)