How to Add All Option in Power Apps Dropdown?

While working with the Power Apps Dropdown control, we usually need to filter the data like SharePoint list records, Collection records, and Excel items based on the dropdown selected value.

But, sometimes, we need to add an “All” option to a dropdown in Power Apps that allows users to display all the records on the other controls, i.e., [Gallery or Data table].

You can follow this Power Apps tutorial to learn how to add All option in Power Apps dropdown control with a simple example.

How to Add All Option in Power Apps Dropdown

We can add the “All” option to the Power Apps dropdown to enhance the user experience by providing a convenient option to select all items in the dropdown at once rather than selecting each item individually.

Let’s take a simple scenario: I have a SharePoint Online list, i.e., [Project Tracker]. This list contains different columns with various data types.

Column NameData Type
TitleIt is a default single line of text
DescriptionMultiple lines of text
StatusChoice
Start DateDate and time
End DateDate and time
Assigned ToPerson or Group
How to Add All Option to Power Apps Dropdown

In Power Apps, there is a Dropdown control and a Data table control.

The dropdown control retrieves all the SharePoint choice field records [Status], and the data table filters and displays each record from the SharePoint list based on the dropdown selected value.

Add All Option to Power Apps Dropdown

However, I was required to add an “All” value to the dropdown, and whenever the user selects the All option in the dropdown, the data table will display all SharePoint list records.

Have a look at the below screenshot for the output.

Add an All Option to Power Apps Dropdown

To work around this, follow the below steps. Such as:

1. Connect a Blank canvas app to the respective SharePoint Online list [Project Tracker]. On the Power Apps Screen. Insert a Dropdown control and set its Items property as:

Items = Distinct(
    'Project Tracker',
    Status.Value
)

Where,

  • ‘Project Tracker’ = SharePoint Online list
  • Status = SharePoint list choice field
How to Add All Option to PowerApps Dropdown

2. Then, insert a Data table control and set its Items property to the code below:

Iems = Filter(
    'Project Tracker',
    Status.Value = drp_Status.Selected.Value
)

Where,

  • drp_Status = Power Apps dropdown name
Add All Option to PowerApps Dropdown

3. Whenever the user selects any value from the dropdown, the data table will filter and display the records based on the dropdown selection like below.

Add All Option to Power Apps Dropdown

4. Now, I would like to add the “All” option to the dropdown to display all the records. For that, select the specific screen and set its OnVisible property as:

OnVisible = ClearCollect(
    colProjects,
    {Value: "All"}
);
Collect(
    colProjects,
    Distinct(
        'Project Tracker',
        Status.Value
    )
)

Where,

  • colEmployee = Power Apps collection name
  • {Value: “All”} = Collection Item
How to Add an All Option to Power Apps Dropdown

5. Next, select the Dropdown control and set its Items property as:

Items = colProjects
How to Add an All Option to PowerApps Dropdown

6. Select the Data table and set its Items property as:

Items = If(
    drp_Status.Selected.Value = "All",
    'Project Tracker',
    Filter(
        'Project Tracker',
        Status.Value = drp_Status.Selected.Value
    )
)
How to Add All Option into Power Apps Dropdown

7. If you want to display all the SharePoint list records on the data table whenever the user opens or runs the app, you must set the Dropdown’s Default value as “All.”

Default = "All"
How to Add All Option in Power Apps Dropdown

8. Once your app is ready, Save, Publish, Reload, and Preview the app. The data table always displays all the SharePoint list records until the user selects any other value in the dropdown control, as shown below.

This way, you can add an “All” value to the Power Apps dropdown control.

How to Add All Option in PowerApps Dropdown

Also, you may like some more Power Apps articles:

Adding an “All” option to a Power Apps dropdown is very useful for users who need to display or select all items. Also, it saves time and effort compared to selecting each item individually.

I hope this article helps you. If you have similar requirements to add an “All” option to the Power Apps dropdown, follow the above steps.

>