How to Bind Power Apps Dropdown Values Based On Button Click?

In this Power Apps tutorial, I will show you how to bind Power Apps Dropdown values based on button click.

Here, I will explain through two scenarios:

  1. Binding Power Apps Dropdown values based on button click from a Power Apps collection.
  2. Bind Power Apps Dropdown values based on the button click from a SharePoint List.

How to bind Power Apps dropdown values based on button click

In this section, I will show you how to bind Power Apps dropdown values based on button clicks with two scenarios:

  1. Using Collection
  2. Using SharePoint list

Power Apps bind dropdown values based on button click from a collection

Here, we will see how to bind Power Apps dropdown values based on button clicks from a collection.

I created a Power Apps Canvas app and added a Dropdown and Button control. When the user clicks the Button, the values will be populated in the Power Apps dropdown control as shown below:

Power Apps bind dropdown values on button click

To achieve it, follow the below steps:

  • On the Power Apps screen, insert a Button control -> Set its OnSelect property to:
ClearCollect(
    col_Countries,
    Table(
        {Country: "USA"},
        {Country: "Germany"},
        {Country: "China"}
    )
)

Where,

  1. col_Countries = Collection name
  2. Country = Collection column name
  3. USA, Germany, China = Collection column values
Bind dropdown values on button click in Power Apps
  • Insert a Dropdown control -> Set its Items property to:
Items = col_Countries
How to bind Power Apps dropdown values on button click
  • Save, Publish, and Preview the app. When the user clicks on a button control, the values will be populated in a dropdown control as shown below:
Bind Power Apps dropdown values on button click

This is how we can bind the dropdown values based on button clicks from a collection.

Power Apps bind dropdown values based on a button click from the SharePoint list

Here, we will see how to bind Power Apps dropdown values based on button clicks from the SharePoint list.

For Example, I have a SharePoint online [Department] that has a column like:

Column NameData type
DepartmentSingle line of text [Title]
Power Apps bind dropdown values based on button click

I added a Button and Dropdown control on the Power Apps screen. When the user clicks on the button [Loan Type], the dropdown values will be bound from the SharePoint list title column, as shown below:

How to bind dropdown values on button click in Power Apps

Follow the below steps to achieve it:

  • On the Power Apps screen, insert a Button control -> Set its Items property to:
Set(
    varDepartment,
    Distinct(
        Department,
        Title
    )
)

Where,

  1. varDepartment = Provide the variable name
  2. Department = SharePoint list name
  3. Title = SharePoint list column name
Bind Power Apps dropdown values on button click using SharePoint list
  • Insert a Dropdown control -> Set its Items property to:
varDepartment

Where,

  1. varDepartment = Variable name
How to bind Power Apps dropdown values on button click using SharePoint list
  • Save, Publish, and Preview the app. When the user clicks a button control, the values will be populated in a dropdown control from the SharePoint list.
Power Apps bind dropdown values on button click using SharePoint list

This is how I have bound the dropdown values based on the button click from the SharePoint list.

Conclusion

I hope this Power Apps tutorial helped you to implement by binding the Power Apps dropdown values based on button clicks with the two scenarios:

  1. How to bind Power Apps Dropdown values based on a button click from a Power Apps collection.
  2. How to bind Power Apps Dropdown values based on the button click from a SharePoint List.

Moreover, you may like some more Power Apps tutorials: