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 / Search function question
Power Apps
Unanswered

Search function question

(0) ShareShare
ReportReport
Posted on by 143

Search(Table1,TextSearchBox2.Text, "Employee_x0020_In_x0020_Charge")

 

This is the code that I am using to search, Table1 is a table in an excel file, textsearchbox2 is the user inputted search and Employee_x0020_In_x0020_Charge is one of the column headers in the excel file.

 

I want the user to search through multiple columns at the same time. I looked through the references and it said I could do this:

 

Search(Table1,TextSearchBox2.Text, "Employee_x0020_In_x0020_Charge", [WorkLocation])

 

But doing this gives me an error, saying expected text value.

Categories:
  • charafRef Profile Picture
    91 on at

    You should use Or function in your search formula :

    Search(Table1,TextSearchBox2.Text, "Employee_x0020_In_x0020_Charge" or TextSearchBox2.Text, " NameID ").

     

     

     

     

  • ShanP Profile Picture
    143 on at

    Is there an alternative to or? When I hover over or it says invalid argument type (boolean) expected a text value.

  • charafRef Profile Picture
    91 on at

     

    see this example on my formula : 
    Sort(If(IsBlank(TextSearchBox1.Text); ManuelsLists; Filter( ManuelLists; TextSearchBox1.Text in Text (AnnouncementType) Or TextSearchBox1.Text in Text (Title))); AnnouncementType; If(SortDescending1; SortOrder.Descending; SrtOrder.Ascending))

     

     

  • ShanP Profile Picture
    143 on at

    Where would I put in my variables? I tried it and it did not work

  • charafRef Profile Picture
    91 on at

    share your formula , maybe i can resolve it or someone else could help you 

  • ShanP Profile Picture
    143 on at

    see this example on my formula : 

    Sort(If(IsBlank(TextSearchBox1.Text); ManuelsLists; Filter( ManuelLists; TextSearchBox1.Text in Text (AnnouncementType)
    Or TextSearchBox1.Text in Text (Title))); AnnouncementType; If(SortDescending1; SortOrder.Descending; SrtOrder.Ascending))

     

     

    What is manuelsLists, what is in Text, what is AnnouncementType?

  • charafRef Profile Picture
    91 on at

    Oups sorry in my head it's was clear lol !

    ManuleList = sourcedata

    AnnouncementType = column

    Title = another column

    Text = it's a kind of formula on items you can write it as : 

    (AnnouncementType; TextSearchBox1.Text)  

    Or :

    (TextSearchBox1.Text in Text (AnnouncementType)

     

    Hope could helps you ! 

  • ShanP Profile Picture
    143 on at

    No, it did not help 😞

     

    I don't think the or function is working properly for me. And if I copy and paste your formula and insert my variables nothing changes

  • CU28061254-0 Profile Picture
    337 on at

    Hi

     

    Why not just use SEARCH instead of Filter ? Others remain unchanged.

     

    Search(DS, Search.Text, "Column1", "Column2", "  ", " ",....)

    Take note that the column to search must be encloded with "...".

     

    Hope this helps,

    TQ

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard