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

Searching in an app

Hello, 

 

I am creating a database of contacts that has browse, edit and view capabilities. I have everything set up as I want except for the search box, I cannot seem to get it to search with any of the formulas I have tried. New to PowerApps so not sure what I am doing wrong. All I want to do is search the data fields from my database source which is a SharePoint List. 

 

Credence2020_0-1598545276428.png   Credence2020_1-1598545310401.png  Credence2020_2-1598545362179.png Credence2020_3-1598545401187.png

 

Any help would be much appreciated! 

 

 

 

 

6 REPLIES 6
PowerAddict
Super User II
Super User II

You will need to search your gallery's Items property to something like this: 

 

Search(DataSource, TextBox.Text, "ColumnName")

 

You can replace DataSource with your current Items property, TextBox with your Search box's name, and ColumnName that you want to use for search. 

 

Let me know if this helps. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Hello, 

 

Yes that is very helpful, I am still stuck on what the column should be or even is to begin with!  I can't find anything straight forward that tells me what a column represents in this context or how to find out what column name I have? 

 

I hope this makes sense, as I finding it hard to explain since I don't know what I don't know!

Hi @Credence2020 

 

What columns do you have in your SharePoint list? And which ones do you want to use for the search capabilities? Let's start off with these 2 questions. Also, what are some of the formulas/expressions that you have tried so far? 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

How stupid of me, I had completely disassociated the fact that my SharePoint list would have columns! 

 

In answer to your questions, the columns I want to search are Company Name, Address Line 1, Primary Telephone, Email Address, Postal/Zip, Country and Company/Branch Website.

 

This is the formula I have just tried:

Search(Gallery2, TextSearchBox1, 'Company Name_DataCard1','Address Line 1', 'Primary Telephone_DataCard1', 'Email Address_DataCard1', 'Postal/Zip Code_DataCard3', Country_DataCard3

 

Credence2020_0-1599143096372.png

 

 

Any further help is much appreciated!

 

Hi @Credence2020 

 

So assuming the column names are exactly like how you have here: Company Name, Address Line 1, Primary Telephone, Email Address, Postal/Zip, Country and Company/Branch Website. You need to modify the expression slightly - instead of using data card names, you need to use column names in double quotes.

 

So try this: 

Search(Gallery2, TextSearchBox1, "Company Name","Address Line 1", "Primary Telephone", "Email Address", "Postal/Zip", "Country", "Company/Branch Website")

Let me know if this works.

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Hello, 

 

That did not work unfortunately. I am using a SharePoint list which I have now read that it is very difficult to actually get a search function within PowerApps when the source is a SharePoint list. 

 

I also tried Filter('Worldwide Employment Database',StartsWith(TextSearchBox1,"Address Line 1","Company Name"))

 

I am not sure how to proceed further with this....

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

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