Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

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