How to Bind Power Apps Dropdown Items From Collection?

Did you know how to bind the Power Apps dropdown items from the collection? If not, don’t worry!

In this Power Apps tutorial, I will explain how to bind Power Apps dropdown items from collection [Manually].

Moreover, we will also explore how to bind the Power Apps dropdown items from the collection [Using SharePoint list].

How to Bind Power Apps Dropdown Items From Collection [Manually]

Here, I will show you how to bind the Power Apps dropdown items from a collection [Manually].

Example:

  • In Power Apps, there is a Dropdown control and a Data table. The dropdown control contains the collection items.
  • When a user selects a value [let’s say May] from the dropdown control, the data table filters and displays the corresponding record based on the selected dropdown value.
Power Apps dropdown items from collection

To achieve it, follow the below steps:

  • Create a Power Apps collection on the screen OnVisible property:
OnVisible  = ClearCollect(
    colBudget,
    {
        'Month': "January",
        'Estimated Expenditure': "$237",
        'Description': "Development Phase 1",
        'Actual Expenditure': "$300"
    },
    {
        'Month': "Febrauary",
        'Estimated Expenditure': "$137",
        'Description': "Development Phase 2.1",
        'Actual Expenditure': "$210"
    },
    {
        'Month': "March",
        'Estimated Expenditure': "$98",
        'Description': "Development Phase 2.4",
        'Actual Expenditure': "$100"
    },
    {
        'Month': "April",
        'Estimated Expenditure': "$300",
        'Description': "Development Phase 2.8",
        'Actual Expenditure': "$300"
    },
    {
        'Month': "May",
        'Estimated Expenditure': "$80",
        'Description': "Development Phase 3",
        'Actual Expenditure': "$90"
    },
    {
        'Month': "June",
        'Estimated Expenditure': "$200",
        'Description': "Development Phase 3.8",
        'Actual Expenditure': "$300"
    },
    {
        'Month': "July",
        'Estimated Expenditure': "$400",
        'Description': "Development Phase 4",
        'Actual Expenditure': "$300"
    },
    {
        'Month': "August",
        'Estimated Expenditure': "$150",
        'Description': "Development Phase 4.1",
        'Actual Expenditure': "$200"
    });

Where.

  1. colBudget = Collection Name
  2. ‘Month’, ‘Estimated Expenditure’, ‘Description’, ‘Actual Expenditure’ = Collection Headers
Dropdown items from collection in Power Apps
  • Insert dropdown control -> Set its Items property to:
Items = Distinct(colBudget,Month)

Where,

  1. colBudget = Collection name
  2. Month = Particular collection column name
How to Bind Power Apps Dropdown Items From Collection
  • Insert a Data table control and set its Items property to the code below:
Items = Filter(
    colBudget,
    Month = drp_Month.Selected.Value
)

Where,

  1. colBudget = Collection name
  2. Month = Particular collection column name
  3. drp_Month = Dropdown control name
How to bind Power Apps dropdown items from the collection
  • Save, Publish, and Preview the app. By selecting a value from the dropdown control, the data table will automatically filter and display the corresponding record.
Bind dropdown items from collection in Power Apps

This is how to bind the Power Apps dropdown items from the collection [Manually].

Bind Power Apps Dropdown Items From Collection [Using SharePoint list]

In this section, let’s see how to bind the Power Apps dropdown items from the collection [Using SharePoint list].

Example:

  • I have a SharePoint list [IT Request List], which has various columns like:
Column NameData Type
IssueTitle
StatusChoice [“Completed”, “Ongoing”, “Cancelled”]
Issue Raised ByPerson or group
Issue Handled ByLookup
Power Apps dropdown items from a collection
  • In Power Apps, there is a Dropdown control and a Gallery control. The dropdown control contains the values from the SharePoint choice column.
  • When a user selects a value from the dropdown control, the data table filters and displays the corresponding record based on the dropdown choice value.
Bind Power Apps dropdown items from the collection

Follow the below steps to achieve it:

OnStart = ClearCollect(colDetails,'IT Request List')

Where,

  1. colDetails = Collection name
  2. IT Request List = SharePoint list name
Dropdown items from collection in a Power Apps
  • Insert Dropdown control and set its Items property to:
Items = Distinct(colDetails,'Status '.Value)

Where,

  1. colDetails = Collection name
  2. Status = SharePoint list choice column name
How to bind dropdown items from collection in Power Apps
  • Insert a Gallery control and set its Items property to:
Items = Filter(
    colDetails,
    Status.Value = drp_Status.Selected.Value
)

Where,

  1. colDetails = Collection name
  2. Status = SharePoint list choice column name
  3. drp_Status = Dropdown control name
Power Apps bind dropdown items from a collection
  • Now, run the Run Onstart app. Save, Publish, and Preview the app. By selecting a value from the dropdown control, the gallery will automatically filter and display the corresponding record based on the dropdown selected value.
How to bind Power Apps dropdown items from a collection

This is how to work with Power Apps dropdown items from the collection [Using SharePoint list].

Conclusion

This Power Apps tutorial explained all about Power Apps dropdown items from the collection, like:

  1. How to bind the Power Apps dropdown items from a collection [Manually]
  2. How to bind the Power Apps dropdown items from a collection [Using SharePoint list]

Also, you may like some more Power Apps tutorials: