cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Gallery Checkbox List

I have looked through a lot of power apps posts on how to use Checkbox with Gallery to save and load from SharePoint List Database and there doesn't seem to be any simple or strength forward answers that work. Don't get me wrong I have tried using LookUp(), Patch(), Collection()  First(Sort()), Concat() and ForAll() with mixed results, where one thing might work but another thing doesn't. Let me know if there is a way to get this to work or if I'm just changing my own tail.

This is as far as I got.

GalleryCheckbox.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Gallery Checkbox List

Hi @natmaxex 

Mr. Dang came up with a way to make a gallery look like a multiselect listbox. This was to get around the problem of having default selected items in a listbox (FYI this can't currently be done).  Using his idea, you can put a checkbox in the gallery in addition to a text description. Take a look at how he did it. https://powerusers.microsoft.com/t5/Building-Power-Apps/Multiple-Defualt-Values-in-Listbox/td-p/2114... 

View solution in original post

5 REPLIES 5
Highlighted
Super User
Super User

Re: Gallery Checkbox List

@natmaxex 
You'll want to read this MS blog article on how to implement checkboxes in a gallery w/ SharePoint.  It explains the process quite well.

 

Link to MS Blog Article

https://powerapps.microsoft.com/en-us/blog/multivaluedchoicesinforms/

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Community Support
Community Support

Re: Gallery Checkbox List

Hi @natmaxex ,

Could you tell me

1)the gallery's Items

2)where do you put these check boxes? inside the gallery?

3)what do you want these check boxes used for?

4)the fields' data type related to these check boxes?

5)your data source?

Yes, check box's settings are a little complex.

You need to set check box's Text and Default one by one.

Text property(text type) is the text displayed behind the check box.

Default property(true/false) is the default value of this check box.

Then use formula about checkbox.Value to update.

 

If you want to know how to update and display in details, please show me more details about your issue.

I've figured out a issue about using check boxes to display and update lookup field(allow multiple choices), you could refer this:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Show-Checkboxes-instead-of-multi-select-drop...

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Resolver I
Resolver I

Re: Gallery Checkbox List

I don't want to create a checkbox for every vehicle-check List column item that needs to be checked, I want to create one checkbox in Gallery and have it get all the checkbox items from the vehicle-check list column and generate checkboxes in the gallery based on the List vehicle-check column checkbox data so i can save and load whether or not it is checked easily. 

I don't want to create a whole new List with multiple Columns representing each checkbox like in this tutorial:

https://powerapps.microsoft.com/en-us/blog/multi-select-pattern-on-sharepoint-lists/

 

There has to be a way to use Gallery with a 'List, Column'. The implication is to strongly implied that checkboxes cold be used and created and it would be a wast not to use it more efficiently.
checkboxItems.PNG

 

I tried this to set whether or not it's true but got errors:

 

Concat(Gallery3.Selected.Checkbox1,Value)

 

In the editForm > checkboxCard > Update

 

I think I need something that gets the "name" of the item that is true like

 

If(Gallery3.Selected.Checkbox1.Value = true, Gallery3.Selected.Checkbox1.Name)

 

 

I was able to get it to kinda start working by setting up some of the theses parameters:

Gallery > Items 

 

Choices([@List].List_x0020_Data)

 

Checkbox > Text

 

ThisItem.Value

 

 I don't think this is how i am supposed to set up the Checkbox > Default

 

If(Blank(),ThisItem.IsSelected)

 

Highlighted
Super User
Super User

Re: Gallery Checkbox List

Hi @natmaxex 

Mr. Dang came up with a way to make a gallery look like a multiselect listbox. This was to get around the problem of having default selected items in a listbox (FYI this can't currently be done).  Using his idea, you can put a checkbox in the gallery in addition to a text description. Take a look at how he did it. https://powerusers.microsoft.com/t5/Building-Power-Apps/Multiple-Defualt-Values-in-Listbox/td-p/2114... 

View solution in original post

Highlighted
Resolver I
Resolver I

Re: Gallery Checkbox List

I'm accepting the proposal above as a solution but we really should look into getting this to work I still need to get the items that aren't selected so emails can be sent saying that those items need to be repaired or replaced. Let me know if there is a way to get a list of the Items not sent to the temp.

 

Also, I almost got this to work.

almost.PNG

 

All i need know is how to grab the true/false values from the checkboxes in Gallery and put them in the Choice Checkboxes_DataCard1>Update

 

Concat(Gallery3.AllItems.Checkbox1,Value)
or
If(Gallery3.AllItems.Checkbox1.Value = true,Gallery3.AllItems.Checkbox1)

 

I learned you can't use the Gallery.Selected because you cant select more than one item at a time so I turned off the selectable option since I won't be using that.
And if you notice I have a Lable inside the Gallery with 

 

Checkbox1.Text&" = "&Checkbox1.Value

 

that tells me the name and value(true/false) of the checkbox that is in the current Gallery slot.

It's like i have all the pieces are there i just can't get them to fit together.

 

On a side note, there is a thing i find strange

 

Concat(Gallery3.AllItems,Checkbox1.Value&", ")

 

I was using this in a Lable to debug the Gallery>Checkboxes to see if i could return or view the true/false values of each checkbox but it doesn't work, whether or not the boxes are checked it alwase returns false except for the first checkbox like it's trying to read the gallery selection even though i no longer want to try and read that Gallery option. should i put something in the checkbox > Advanced > Default 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,211)