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 / PowerApp - Dropdown an...
Power Apps
Answered

PowerApp - Dropdown and Text input search box

(0) ShareShare
ReportReport
Posted on by 138

Hi, 

 

I am building a PowerApp and looking for some suggestions on the following issue.

 

The App has a data source with Columns (A,B,C,D,E) and so what I would like to create is a drop down, which allows a user to select option D from A,B,C,D,E and then in the text input search box type something 'demo' and the gallery to bring back all results where 'Demo' is in option D.

 

Hope that makes sense

 

Kind Regards

Categories:
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Gelegeta86,

    Actually, we could only refer to column name using a literal text string not a value based on dropdown seletced.

     

    As a workaround, you could use hard code as below:

    If(Dropdown3.Selected.Value="D",Search(Data,TextInput1.Text,"D"),
     Dropdown3.Selected.Value="A",Search(Data,TextInput1.Text,"A"),
     ...
    )
  • PowerNuggets Profile Picture
    360 on at

    Hi @Gelegeta86 

     

    Try the below 

     

    Search(

    If(

     

    //this is for all filter 
    IsBlank(Filter1.Selected.Result),'data source',

     

    //this is for filter  chosen a value, example organization name
    !IsBlank(filter1.Selected.Result), Filter('datasource','Requester Organization' = flter1.Selected.Result)),

     

    //searching text field for example 
    textfield.Text,"RequesterName")

     

    Hope this helps, if this solves your requirements kindly mark the post as solved

     

    KR,

  • EvanE86 Profile Picture
    138 on at

    Hi,

    Thank you for getting back to me.

    I am looking for something similar however where you have 'Requester Organization' I would like this to change based on the value in the dropdown, is that possible?

     

    Kind Regards

  • PowerNuggets Profile Picture
    360 on at

    Hi @Gelegeta86 

     

    yes, i assumed the filter 1 is your drop down menu and the textfield.Text is a search box, this way it will combine both

  • EvanE86 Profile Picture
    138 on at

    Apologies I feel like I may be doing something different here ( I have covered the DB name).

     

    Would you be able to advise.

     

    Gelegeta86_1-1687335959240.png

     

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Gelegeta86,

    Not sure if my reply is not what you want, so you insist on investigating that if dropdown seleted value could represent the column name directly.

     

    Column Name expectd literal text string, which could not be referred to in Power Apps.

    The only way you could do is to hard code the colum name based on dropdown selected value.

     

    @PowerNuggets, I don't think you get what the @PowerNuggets wants to achieve.

    It is not a deal about how you filter the data source, but to filter based on different columns by referring to dropdown selected column name directly.

  • PowerNuggets Profile Picture
    360 on at

    Hi @Gelegeta86 

     

    Please rename as per your controls names

    Filter1 rename it to your drop down control name

    "Requester organization" will be the column name in your data source that contain A,B,C,D

    Textfield rename it to your search text box

    'RequesterName" rename it to the column name you want to search for in your data source as you said Demo ...etc. 

     

    Hope this helps

     

    KR.,

     

  • EvanE86 Profile Picture
    138 on at

    Hi,

     

    Thank you for your reply,

     

    I will give your solution a try and see where I get too as I was hoping that the solution @PowerNuggets provided would cater my requirements.

     

    Kind Regards

  • EvanE86 Profile Picture
    138 on at

    Hi,

     

    I have used your method and it works for what I am looking for.

     

    Two questions - 

     

    1) Is there a way to stop the gallery from populating when i select an option from the dropdown, and only populates once i press the search button.

     

    2) Is there anyway I can update the code to search for a number, as one of the columns as a sequence number and so i would like users to be able to select sequence number and it populate.

     

    Thank you for your support on this.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard