Select All for a Multi-select choice field in Power Apps

How do you select all items in a multi-select choice column in a SharePoint form?

For small choice fields with only two or three options this doesn’t matter too much, but if you have more than 4 options the missing select all is missing quite quickly.

Multi-Select choice columns

In SharePoint you can have multi select columns. Within these column you can tick each option but there is no select all option available. This is quite annoying isn’t it?

We will need to customize the form. Customizing forms is done with Power Apps by selecting the customize with power apps option from the list menu.

We now want to add a checkbox to the form so that all options can be selected as shown below.


And none of the options should be selected when the tick box is deselected!

How to create the Select all?

In my form I located my Favourite Ice cream Multi-select field’s datacard, then I unlocked this field.

You will have to unlock the field otherwise you can configure the filtering as Power Apps doesn’t allow you to set anything within the datacard control unless it is unlocked.

You might have to position the check box correctly on the form. You can place it where ever you like as long as you stay within the form.

Now I set the DataCardValue2 (this is the one of my favourite icecream field) to SelectedItems. Selected Items will be a variable that I’m about to create in the next steps.

Setting the SelectedItems Variable

The OnSelect code for the CheckBox1 control now needs to be set to the following code:

If(
    Checkbox1.Value,
    Set(
        SelectedItems,
        [
            "Vanilla",
            "Strawberry",
            "Chocolate"
        ]
    ),
    Set(
        SelectedItems,
        []
    )
)

So depending on the value of the checkbox we will either set the Selected Items to an array of flavours or we simply set it to an empty collection []

The End Result

Share
Pieter Veenstra

Business Applications and Office Apps & Services Microsoft MVP working as a Microsoft Productivity Principal Consultant at HybrIT Services. You can contact me using contact@veenstra.me.uk.

Recent Posts

8 top reasons to use Dataverse or SharePoint lists in the Power Platform

Why would you use Dataverse, if SharePoint lists gives you the option to avoid premium…

6 days ago

Filter by calculated fields in SharePoint using Power Automate

When you read items from a SharePoint list and you want to filter by calculated…

1 week ago

Expected String but got Null, when calling a flow from a Model Driven app

A few weeks ago I looked at calling flows from model driven apps. And for…

1 week ago

Get all your broken connections using Power Automate

To get all your broken connections in the Power Platform can be a challenge. In…

2 weeks ago

Customer Voice a.k.a. Forms Pro the database behind the magic

If you call Customer Voice still Forms Pro or not, have you ever looked into…

2 weeks ago

Many running flows in Power Automate

Recently I noticed that some of my flows end up with many running flows. Types…

3 weeks ago
%%footer%%