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 Via Specified C...
Power Apps
Answered

Search Via Specified Column

(0) ShareShare
ReportReport
Posted on by 13

Hello!

 

I am trying to make a PowerApp with a gallery of inventory items. I want to use the "Search" function to enable users to quickly sort data.

 

The search function takes in 3 arguments: the data source, a text to search for, and a column/attribute to look at when searching. I want to use a text box to fill in the second argument, and a dropdown selector to allow the user to specify which column/attribute to search by. However, when I do this, I get an error: "Expected text. We expect text at this point in the formula". I am not sure what the issue is, because I believe that my inputs to the Search function should be evaluating to text. I have even tried casting the last argument to text (second picture), but this did not work. 

 

Any help would be greatly appreciated!

 

NoahJedi_1-1686598624219.png

 

NoahJedi_2-1686598708041.png

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    36,731 Super User 2026 Season 1 on at

    Hi @NoahJedi 

    It's not possible to specify a column dynamically as stated in the documention.

    https://learn.microsoft.com/en-gb/power-platform/power-fx/reference/function-filter-lookup

     

    timl_0-1686600800893.png

     

    A workaround is to call the Switch function like so:

    Switch(dd_search_key.Selected.Value,
     "Column1",
     Search('Asset Manager', txt_search.text, "Column1",
     "Column2",
     Search('Asset Manager', txt_search.text, "Column2",
     "Column3",
     Search('Asset Manager', txt_search.text, "Column3"
    )

     

     

  • NoahJedi Profile Picture
    13 on at

    Ahhh; I see. Thank you for the workaround!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard