Notifications
Announcements
Hello,
I have a checkbox on a form and based on the value of another field in the gallery (I'm using an editable grid) I set the DisplayMode to either Edit, View or Disabled. outside my grid I have a checkbox on the header that when you check it, it checks all the boxes in that grid (or checks them off, depending) It all works great except when I have a disabled field, then it checks it on or off based on the outer checkbox. Obviously this can't be. when I disable fields it's because I need to preserve that data and not patch a different value... not patch anything for that field.
Any help is appreciated.
thanks.
Hi @AmyF ,
I assume your solution to select all checkboxes somehow utilizes the Default property of the checkboxes. If correct, you'll need to add a condition in there to only apply this in case:
Self.Displaymode = DisplayMode.Edit
Hi, I haven't had a chance to test this yet as I've gone beyond it in my code. I will try that and get back to you. But in just reading your reply I think that will address my original question, but my question is expanded since then. The checkboxes that are also getting checked on or off are the other sections of the grouped data. Even if a section is collapsed because a different part of the groupby is selected, those checkboxes get checked on or off (the ones in the collapsed sections) I'm not sure I'll be able to code around that. I think your solution will work for the original problem I have but something else will have to be done to not affect the checkboxes that are in a collapsed section. sorry for my late reply, I've been out of the office. Cheers and thanks.
Hi BCBuizer, thanks again for the previous response. That won't work for me and I'll explain why. I'm working with a groupby and the checkbox is in the child/nested gallery. I've gotten so that it doesn't check on a disabled checkbox and that's great. Now I need to be able to tell if the checkbox is in one of the child galleries that is visible (if the outer grouped value is selected, then its child gallery is visible, the others are not visible, they're collapsed but the checkboxes get checked. Now I'm not POSITIVE that they're checked when collapsed, but, after having checked the CheckAll box when one section of the outer gallery was selected or if they became checked when the parent became selected.
So, after all of that, I want all the checkboxes whose parent is selected (and aren't disabled ) to be affected by the CheckAll box and none of the checkboxes whose parents are not selected. AND when I select a different parent gallery the checkboxes are whatever value they had prior to me previously having checked the other child's parent. Please see image uploaded.
I'm still confident this will work, but how to do it depends on how your SelectAll mechanism works. Perhaps you can share a bit more on that so I can give more directed inout?
Also, I've moved the checkbox onto the parent gallery and still haven't figured this out.
In case you wish the checkbixes in the child gallery to ignore the SelectAll mechanism in case the parent checkbox is disabled, add a condition to the Default property of thr checkbox in the child gallery:
If(
ThisItem.ParentCheckbox.Displaymode = DisplayMode.Edit,
<apply SelectAll>
)
Thanks BCBuizer. Yes, I finally got that part working. I was able to isolate the selected child gallery and as far as that goes, it's working fine. I have another problem now that I've posted a new question about. It's related to this but not the same so I'm marking this as the solution. Thanks very much for your attention and assistance. Cheers.
BCBuizer My next problem is getting the values from the nested children (works on manual click, but can't find way to get the IDs when the CheckAll Parent button used) Here is my new post if you'd like to help: https://powerusers.microsoft.com/t5/Building-Power-Apps/GroupBy-Galleries-need-to-collect-IDs-of-nested-galleries-for-a/m-p/2320194#M579675 Thanks
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Kalathiya 402
WarrenBelz 380 Most Valuable Professional
MS.Ragavendar 293 Super User 2025 Season 2