Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

How to have multiple checkbox datacards

Hi there!  I was able to convert a dropdown to checkboxes and was able to keep multiple checkbox entries by using a Gallery and changing some code. Works great.  I tired to do the same to the next datacard but there are conflicting results when I check from both places. I have a feeling it is the ForAll(ColCheckedArea) code that is messing it up. How can I have multiple datacards with checkbox Galleries?  Here is the code I used for the first one.

Gallery1 Checkbox-   

Oncheck-  Collect(colCheckedArea, {Title:ThisItem.Value})

OnUncheck-   RemoveIf(colCheckedArea, Title=ThisItem.Value)

In the dropdown item – DefaultSelectedItems -  ForAll(ColCheckedArea, {Value:Title})

I even changed the Title to Title2 on the second Gallery but that didn’t work. 

Please let me know if you need more info and thank you for your time.

Super User
Super User


Firstly, you are not dealing with a Dropdown if you have a DefaultSelectedItems, that is a Combobox.  And, with a combobox, your DefaultSelectedItems signature MUST match the record structure defined in the Items property.  So, I would first look at that.  If the Items property is not a table of single column rows with a column named Value, then nothing will match.  

If, for example, you have an Items property of ["a", "b", "c"] then you will have a single Value column table and you can set your DefaultSelectedItems to : RenameColumns(colCheckedArea, "Title", "Value")  (you don't really need ForAll to set your items).

But, if your Items property is more complex, then your DefaultSelectedItems needs to match that signature.


I hope this is helpful for you.

Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thank you RandyHayes!  You are correct, it is a Combobox.  I will give your suggestion a try.  Thanks

Helpful resources

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,812)