Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 8XM3EVtiy1mMbqrHPhBcRW
Power Apps - Building Power Apps
Answered

PowerApp - Dropdown and Text input search box

Like (0) ShareShare
ReportReport
Posted on 21 Jun 2023 07:16:53 by 134

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

  • Gelegeta86 Profile Picture
    134 on 21 Jun 2023 at 11:57:53
    Re: PowerApp - Dropdown and Text input search box

    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.

  • Gelegeta86 Profile Picture
    134 on 21 Jun 2023 at 08:34:23
    Re: PowerApp - Dropdown and Text input search box

    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

  • PowerNuggets Profile Picture
    360 on 21 Jun 2023 at 08:33:11
    Re: PowerApp - Dropdown and Text input search box

    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.,

     

  • v-qiaqi@microsoft.com Profile Picture
    on 21 Jun 2023 at 08:29:51
    Re: PowerApp - Dropdown and Text input search box

    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.

  • Gelegeta86 Profile Picture
    134 on 21 Jun 2023 at 08:27:04
    Re: PowerApp - Dropdown and Text input search box

    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

     

     

  • PowerNuggets Profile Picture
    360 on 21 Jun 2023 at 08:11:45
    Re: PowerApp - Dropdown and Text input search box

    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

  • Gelegeta86 Profile Picture
    134 on 21 Jun 2023 at 08:08:05
    Re: PowerApp - Dropdown and Text input search box

    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 21 Jun 2023 at 07:42:31
    Re: PowerApp - Dropdown and Text input search box

    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,

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on 21 Jun 2023 at 07:40:34
    Re: PowerApp - Dropdown and Text input search box

    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"),
     ...
    )

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,075 Most Valuable Professional

Leaderboard