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.
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
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.
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.
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).
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us for the next call on June 15, 2022 at 8am PDT.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.