Skip to main content
Community site session details

Community site session details

Session Id : /ya8cQnLwdPJ+kdTPMyCae
Power Apps - Building Power Apps
Answered

Using Search Function (newbie question)

Like (0) ShareShare
ReportReport
Posted on 21 Dec 2016 16:01:49 by 29

I've put together my first app, and am trying to get the Search Items box. I've got the following formula (which I have based on some samples I found online):

 

Search('Table1', TextSearchBox1.Text, "First_x0020_Name","Last_x0020_Name","Cabin")

 

When things are searched, nothing comes up. What am I missing?

 

Thanks

  • Barbershop427 Profile Picture
    29 on 22 Dec 2016 at 16:40:40
    Re: Using Search Function (newbie question)

    That was the exact problem I was having. Leave the formula exactly as it appears, but then add in your "Location_x002f_Job " "Tool ", "Tool_x0020__x0023__x0020_ID"

     

    I put mine in at the front, but am fairly certain that the order doesn't matter.

  • Community Power Platform Member Profile Picture
    on 22 Dec 2016 at 16:31:42
    Re: Using Search Function (newbie question)

    I start off by on the "Browsescreen1" page. I click on the "Browsegallery1".  I go to the "Date" section and then the "items" section to enter in the following formula.

     

    SortByColumns(Search(Table2, TextSearchBox1.Text, "Location_x002f_Job ", "Tool
    ", "Tool_x0020__x0023__x0020_ID", If(SortDescending1, Descending, Ascending))

     

    The columns I want it to pull from are called "Location_x002f_Job " "Tool ", and "Tool_x0020__x0023__x0020_ID". 

     

    Every time I enter in this information it throws error codes all over and it no longer shows the text from the 3 columns I had there.  It also keeps auto correcting "Sortdescending1" and the other two to "Sortdescendin".  

     

    Do you see any error in what I am doing?

  • Barbershop427 Profile Picture
    29 on 22 Dec 2016 at 15:50:35
    Re: Using Search Function (newbie question)

    In the design view, by clicking on the template (BrowseScreen),  "Item" will appear in the formula bar. Mine had this as a default:

     

    SortByColumns(Search(Table1, TextSearchBox1.Text, "C1","C2", If(SortDescending1, Descending, Ascending))

     

    Where C1 and C2 were the names of the columns.

     

    I added in the names of the columns I needed and it was fine.

     

    Hope it helps.

  • Community Power Platform Member Profile Picture
    on 22 Dec 2016 at 15:33:56
    Re: Using Search Function (newbie question)

    I am having the same problem and cannot figure it out. What is the default "search items" formula?  I have tried replacing the "Data Text" in the formula that is there with the data I want it to actually pull from and it gets completely messed up.

  • Verified answer
    Barbershop427 Profile Picture
    29 on 22 Dec 2016 at 14:18:20
    Re: Using Search Function (newbie question)

    Thanks for the response. 

     

    As I said, it's a newbie question, and I've actually got it figured out....

     

    The "Search Items" formula was there (because I was using one of the templates), but the problem was it had all of the wrong columns for some reason. Basically, all of the columns of my table were there, except for the ones I wanted to search. 

     

    Initially, I took out the default column names. That completely messed up everything (telling me I had invalid stuff everywhere). Once I got back to the default formula, I simply added in the column names I wanted to use for the search. Everything worked just fine after that.

     

    Thanks for your help!

  • v-micsh-msft Profile Picture
    on 22 Dec 2016 at 08:17:22
    Re: Using Search Function (newbie question)

    Hi @Barbershop427,

     

    Would you please share more details regarding the controls/functions that you used in your App?

    And if convenient, please share a screenshot here.

    Just from the information you posted, I could think out the following scenario:

    What should be considered to achieve here is use the search function to return the filtered table based on the value in the TextInput box, right?

    Here I would take the SharePoint List as an example:

    1. Create a Blank canvas under PowerApp New App menu,

    2. Click Data sources, add the SharePoint list data source,

    3. Click Insert, Insert a TextInput Box from Insert->Text->TextInput, Insert a Gallery from Insert->Gallery->Text Gallery->Vertical,

    4. Change the Gallery items property with the formula below:

    Search(WQEWW,TextInput1.Text,"Title")

    54.PNG

    Adding the search function articles for reference:

    Filter, Search, and LookUp functions in PowerApps

    "

    Search( Table, SearchString, Column1 [, Column2, ... ] )

    • Table - Required. Table to search.
    • SearchString - Required. The string to search for. If blank or an empty string, all records are returned.
    • Column(s) - Required. The names of columns within Table to search. Columns to search must contain text. Column names must be strings and enclosed in double quotes. If SearchString is found within the data of any of these columns as a partial match, the full record will be returned

    "

    If you have any further questions, please feel free to psot back.

    Regards

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete