Showing results for 
Search instead for 
Did you mean: 

How to filter or Search SQL Search results from a gallery?

Hi new to PowerApps and trying to learn as I go.


I have an application where I am doing a search on a SQL Table to return records based on who is logged in and that part works.  Now I want to either do another search based on those returned results or filter of those results based on what someone is searching on in a text box.

I've tried filter when using on prem-SQL and the results take forever so I went with search statement instead and it's much much quicker.  Is there something wrong in my filter statement? or is filter that much slower than search?

Here is the formula I'm using on Items to display in a gallery.


Filter Function: (Very Slow) but it returns data based on OwnerName who is logged in

Filter('[dbo].[Test]',Lower(OwnerName) = Lower(Office365Users.MyProfile().DisplayName))


Search Function to display same data (Much Faster)


I get results back in the gallery but now I want to add a search box that will search / filter the first results returned.

So the search is first on Owner Name but that might return 400 rows and to limit that further I want a search box that a user could type information in that would further filter this data down so it's more usable.

This is all tied back to a SQL on-premise backend.

Any suggestions or help would be greatly appreciated.

Not applicable

Hi @PowerAppsJunkie - our Community Support Team helped a user with a similar question. I will include the link to the post and the answer from CST below. Please review when you have time and advise if this is what you're looking for. 


Link to the thread -


CST response:


For your first question, do you want to create a search bar within your app? More details about create a search bar within PowerApps app, please check and see if the following video would help in your scenario:

In addition, I think the "List Screen" (Screen template) could also achieve your needs. The "List Screen" (screen template) as below:4.JPG

When you add a "List screen" within your app, it would generate a screen which contains a Search bar box and a gallery automatically as below:5.JPG


For your second question, do you want to send an reply email within your app? If you want to send an email within your app, I think the Office365.SendEmail() function could achieve your needs. Before using Office365.SendEmail() function, you need to add a Office 365 Outlook connection within your app.

More details about the Office365.SendEmail() function, please check the following article:

Please also check and see if the following video would help in your scenario:

So on your side, you should add the Office365.SendEmail() function within the OnSelectproperty of the "Submit" button as below:

SubmitForm(EditForm1); /* <-- Submit your internal Note*/
    "Subject of the email",
    "Body of the email"


Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (4,381)