I have a gallery with checkboxes and some of them are preselected based on a previous input. I need a formula that will go through the gallery and list the selected checkboxes into a collection. Once someone selects/deselects the checkbox it needs to be added/removed from the collection.
I currently have a collect and remove function in the on check and on uncheck section of the checkbox.
The data in the checkbox is pulled from a groupby function so there are 3 columns in my collection.
Thank you so much for your help!!
You really don't need the collections for any of this. The Gallery already serves as a collection/table.
To get all the checked rows in your Gallery, use the following formula:
This will return a table of all the checked rows.
No additional OnCheck/OnUncheck or collections needed.
I hope this is helpful for you.
The filtering works perfectly thank you!
I've run into another problem. I have 3 galleries. Based on the selected of the first gallery it displays items in the second one, and based on the second one, it displays the items in the third one.
My items formula for the second gallery is: GroupBy(Filter('Items', Branch in Filter(galDirectorate_2.AllItems, cbDirectorate_2.Value).Branch), "Directorate0", "Branch","GroupedDirectorate")
And my default is : If(cbDirectorate_3.Text exactin LookUp('BIA Data', ID = varIDedit).'Upstream Directorate', true, false)
When I edit past data that i already imputed, all of the galleries work. It only doesnt work when im filling blank data.
Also, I can see all of my items in the preview table but they arent showing up in the gallery.
Thank you! let me know if you need more info!
I got a little lost in the description! You mention the "default", what is that a default for?
Can you provide a screenshot or something to show what you are seeing/not seeing?
Directorate Gallery Items: GroupBy(Filter('BIA Input', Branch in Filter(galDirectorate_2.AllItems, cbDirectorate_2.Value).Branch), "Directorate0", "Branch","GroupedDirectorate")
CheckBox for the Directorate Gallery :If(cbDirectorate_3.Text exactin LookUp('BIA Data', ID = varIDedit).UpstreamDirectorate, true, false)
The reason I have a default is because I want people to be able to edit what they previously imputed.
We're getting there...
Can you clarify for me where galDirectorate_2 is - I am assuming it is the top gallery of checkboxes - but want to be clear.
Also, it seems that varIDedit is relevant to the process - I assume that is just a numeric record ID?
You are also setting the default based on the text property of the checkbox. So, I assume that cbDirectorate_3 is in the bottom Gallery under the Directorate label - please clarify and if so, what is the Text property of that check box?
I THINK that is all the questions I have at the moment.
hey lol sorry i really need to work on renaming my items haha. lets restart... i renamed everything so hopefully this helps
and Yes! varIDedit is the ID of the record that the person is currently editing.
Thank you so so much
Excellent!! That looks like it has much more detail...unfortunately, I can't see them very well. They show up small, even if I zoom in on them they just get blurry. Can you possibly repost those images in a larger format so I can read the formulas?
Tip, if you're on a Windows computer, you can press windowkey-shift-s on the keyboard to bring up the screen clipper. Highlight the part you want to clip, then simply come back to your post and do a ctrl-v to paste the clip into the post.
If you *were* doing that before, then just post them in larger format.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us for the next call on June 15, 2022 at 8am PDT.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.