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 / Change combobox search...
Power Apps
Unanswered

Change combobox search field based on value from variable

(0) ShareShare
ReportReport
Posted on by 4

Hello, I have a combobox and I would like to change the SearchFields based off the value from a variable, is this possible? The code I have for it now in that field is "If(ENG = true, ["ENG_Column"], ["FR_Column"]" but this only searches on the ENG column. I'm thinking PowerApps doesn't allow this but any insight is appreciated, thank you! 

Categories:
I have the same question (0)
  • madlad Profile Picture
    2,637 Moderator on at

    I don't know of a way to do this, but a workaround would be to place a text input above this, disable searching, then set the items to:

    If(ENG=true, Search(YourList, "ENG_Column", YourTextInput.Text), Search(YourList, "FR_Column", YourTextInput.Text))

     

    Hope this helps!

  • madlad Profile Picture
    2,637 Moderator on at

    Funnily enough, I had to do this exact same thing for a project I'm working on not an hour later, and I think I've come up with a more elegant workaround. 

     

    In the Items field, use:

    If(ENG, AddColumns(YourList, "ENGFR", ENG_Column), AddColumns(YourList, "ENGFR", FR_Column))

     

    Then, set the Search Field to be ENGFR, and if your searching based on ENG, ENGFR will be the ENG_Column, and if not it will be the FR_Column

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard