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 / Can I search based on ...
Power Apps
Answered

Can I search based on a dropdown within a filter

(0) ShareShare
ReportReport
Posted on by 227

I want to filter my view in SQL, which is based on a search box and  a dropdown with a column name

I can't get this to work, is this possible?

the attached picture explains my problem

within the dropbox, I have 'Name' 'Description' which are fields within my SQL view gallery

So if Name is selected, the user can search by name

If description is selected, the user can search by description

help.PNG
Categories:
I have the same question (0)
  • cwebb365 Profile Picture
    3,300 Most Valuable Professional on at

    I don't know if there is a better way to do it, but you could just use an IF on the gallery. 

     

    So IF(Dropdown.value = "Name", Filter(your filterto get name), Filter(your filter to get desc.))

     

    If you need more you can nest if's, but that's the quick and easy way to get it now lol... 

  • jesenavaranjan Profile Picture
    227 on at

    If(FilterInput.Value="Name",Filter('[dbo].[tbMilestone]',Name=SearchInput.Text),'[dbo].[tbMilestone]')

     

    Thank you! Is there anything wrong with my syntax above? and it's not working...

  • cwebb365 Profile Picture
    3,300 Most Valuable Professional on at

    Yeah you need description in there too if you're searching for it. 

     

    If(FilterInput.Value="Name",Filter('[dbo].[tbMilestone]',Name=SearchInput.Text),Filter('[dbo].[tbMilestone]',Description=SearchInput.Text))

  • jesenavaranjan Profile Picture
    227 on at

    Thanks


    Actually I had to do: If(FilterInput.Selected.Value="Name",Filter('[dbo].[vwMilestone]',Name=SearchInput.Text),Filter('[dbo].[vwMilestone]',Description=SearchInput.Text))

     

    Also if I want the search to no be strictly equal to, how do I handle that?

    Like a %like% and ignoring cases?

    Jese

  • Verified answer
    cwebb365 Profile Picture
    3,300 Most Valuable Professional on at

    Since you have a SQL back end, luckily it makes it easier. 

     

    You can just do something in your filter like Filter('datasource', Description in Field.text)

  • jesenavaranjan Profile Picture
    227 on at

    THANK YOU

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
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard