web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to filter or Searc...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 151

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)

Search('[dbo].[Test]',Office365Users.MyProfile().DisplayName,"OwnerName")

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.


Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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 - https://powerusers.microsoft.com/t5/General-Discussion/How-to-do-a-search-bar/td-p/184905

     

    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:

    https://www.youtube.com/watch?v=FaTnOOc34os

    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:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-office365-outloo...

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

    https://www.youtube.com/watch?v=bF7WkqtxKB0

    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*/
    Office365.SendEmail(
     "user@email.com",
     "Subject of the email",
     "Body of the email"
    )

    @Anonymous 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard