Checkboxes are commonly used in groups, but Power Apps doesn’t provide a native way to group checkboxes like other platforms.
This can be a bit challenging when you need to manipulate multiple checkboxes simultaneously.
I encountered this limitation while working on a project, so I’d like to share my solution for managing multiple checkboxes efficiently in Power Apps.
About Checkboxes
Let’s start with some checkbox basics, even though it might seem fundamental.
A checkbox is a control element that has two states: “checked” and “unchecked.”
It’s typically used when you need to implement multiple-choice selections in your applications.
*Note: For single-choice selections, radio buttons are the more appropriate option.
In Power Apps, you can monitor the checkbox state through its Value property, which returns a boolean value:
- Checked state → true
- Unchecked state → false
Implementation
Now, let’s implement the bulk operation of multiple checkboxes.
Initial Setup
First, create a collection with items equal to the number of checkboxes you want to display. You can do this in the OnVisible property of the screen containing the checkboxes.

Next, add a gallery control (either vertical or horizontal orientation works)

Connect the gallery to the collection we created earlier.

Add a checkbox control inside the gallery and execute the ClearCollect function. This will display multiple checkboxes.

Adjust the checkbox position and gallery item height as needed. Set the checkbox’s “Default property to ThisItem.Value” and “Text property to Text value”.

Then, configure the Patch function in OnCheck and OnUncheck properties to sync the checkbox state with the Value property of each collection item.

The initial setup is now complete. Add a label to display the Value property of each collection item for testing purposes.

Verify that the checkbox states sync correctly with their respective Values.

Bulk Check Operation
Let’s start by implementing the bulk check functionality.
Add a button and use the UpdateIf function in its OnSelect property to set all items’ Value to true.

When this button is pressed, all checkboxes will be checked simultaneously.

Bulk Uncheck Operation
Next, let’s implement the bulk uncheck functionality.
Add another button and, similar to before, use the UpdateIf function in its OnSelect property to set all items’ Value to false.

Pressing this button will uncheck all checkboxes at once.

Counting Checked Checkboxes
To count the number of checked checkboxes, you can use either the CountIf function or Sum function.

The total count will update automatically as you interact with the checkboxes.

By adding this formula

You can easily verify if all checkboxes are checked.

Easy Addition of Options
Since we’re using a collection to maintain the checkbox states, it’s simple to dynamically add new options.
When you add items to the collection,

The options are easily expanded, making maintenance straightforward.

By adding this formula to a button,

Dynamic addition of options (user-driven additions) becomes simple.

While using a gallery has the limitation of restricted design customization, it offers the advantage of automatically handling X-coordinates and margins between checkboxes. This method is particularly useful when manually adding or updating numerous checkboxes would be time-consuming.
コメント