Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Text search box

(1) ShareShare
ReportReport
Posted on by 4

Hello I am new to PowerApps and I am having issues with the search Items box. I created a simple test list in sharpoint. I want to be able to search the name and have it display from the list below it. I am not sure if I need to make changes in the BrowseGallery1-items area or the TextSearchBox1 area. Thanks for any help!

 

 

Screen Shot 12-15-17 at 01.14 PM.PNG

 

 

 

Screen Shot 12-15-17 at 01.14 PM.PNG

  • Yousra Profile Picture
    20 on at
    Re: Text search box

    Could you elaborate on this part of the function please?

    ||

    NumberColumn = TextSearchBox1.Text

  • iAm_ManCat Profile Picture
    18,206 Most Valuable Professional on at
    Re: Text search box

    Hi @Yousra 

     

    I think you could do something like this:

    SortByColumns(
     Filter(
     ListName, 
     StartsWith(
     Name,
     TextSearchBox1.Text
     )
     ||
     NumberColumn = TextSearchBox1.Text
     ), 
     "Title", 
     If(
     SortDescending1,
     Descending,
     Ascending
     )
    )

     

    Cheers,

    Sancho

  • Yousra Profile Picture
    20 on at
    Re: Text search box

    Is it possible for the search bar to search the list by two different criteria:

    1. Name (or title)

    2. reference number

    Yousra_0-1615507874049.png

    What would the formula look like in this case?

  • iAm_ManCat Profile Picture
    18,206 Most Valuable Professional on at
    Re: Text search box

    I'm happy to help @Tapesh - these kinds of filters can be tricky, and they will come up very often 😺

  • Tapesh Profile Picture
    825 on at
    Re: Text search box

    This solution is perfectly working  "Sir Sancho"

     

     

    Thank you so much for correcting me on my issue and clearing me what was wrong and what is the code or formula is doing. Thanks @iAm_ManCat 

  • eka24 Profile Picture
    20,921 on at
    Re: Text search box
    Continue with @iAm_ManCat
  • iAm_ManCat Profile Picture
    18,206 Most Valuable Professional on at
    Re: Text search box

    Hi,

     

    I can see from your screenshot that you got rid of the Sort Ascending/Descending button on that screen, so that part of the formula will no longer work correctly. Also you have modified the code I gave to an incorrect form, your code now only checks if the StatusResult is not equal to "All". and then displays all items

     

    SortByColumns(
    Filter(
    'Petty Cash',
    StatusResult <> "All",
    'Status' = StatusResult ||
    TextSearchBox1.Text = ""
    ||
    StartsWith('EmployeeName', TextSearchBox1.Text)), "EmployeeName",
    If(SortDescending1, Descending, Ascending))

    It needs to be something like this:

    SortByColumns(
     Filter(
     'Petty Cash',
     
     // here we are saying that the status variable must be "All",
     // which will then not filter any items, or else the status must match the variable
     StatusResult="All" || 'Status ' = StatusResult,
     
     // here we are saying, the textbox text is a blank or else it must
     // additionally filter the above by EmployeeName based on the Textbox Text
     TextSearchBox1.Text = "" || StartsWith('EmployeeName', TextSearchBox1.Text)
     ),
    "EmployeeName",
    If(SortDescending1, Descending, Ascending)
    )

    Can you try something like this and then if it does error, hover your mouse over the error so that we can see the error message details, thanks.

     

    Can you also please paste here the code you are using on each of your status buttons,

     

    Thanks,

    Sancho

  • Tapesh Profile Picture
    825 on at
    Re: Text search box

    Hi @eka24 

    No just the status is the column name and other one StatusResult is variable, and i tried as you said but does not seems to be working 

  • eka24 Profile Picture
    20,921 on at
    Re: Text search box
    Please can you respond to my last reply
  • Tapesh Profile Picture
    825 on at
    Re: Text search box

    Hi I tried this one it is some what working but the issue here now is, when i click on the different buttons, like All i do not see any data, when i click on pending i see all data, then on approve button as well it shows all data, and same on reject button shows all the data. 

     

     

    SortByColumns(
    Filter(
    'Petty Cash',
    StatusResult <> "All",
    'Status' = StatusResult ||
    TextSearchBox1.Text = ""
    ||
    StartsWith('EmployeeName', TextSearchBox1.Text)), "EmployeeName",
    If(SortDescending1, Descending, Ascending))

     

    could you please let me know what part im doing wrong, i guess something which is related to filter .

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 770 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 494

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 399