Hi All,
I'm trying to build a component that has a gallery with a checkbox control. Outside of the gallery, I have another checkbox control named AllChkbox and the default value is "true". I set Default property of the checkboxes in the gallery to be AllChkbox.Value. It's all good on visible event of the screen like below:
When I untick any one of the checkboxes inside the gallery, I'd like the AllChkbox control outside the gallery to become unchecked. However, if I check the AllChkbox control, I would also like to check all the checkboxes inside the gallery. I've been running circles with this logic and can't find the solution. I found one solution here, but this is not inside a component. Is it possible to create this logic inside a component? Help! 😔
-bochie
Solved! Go to Solution.
Thank you for your reply @v-xiaochen-msft ! I solved it last week by adding a boolean column "Show" to the collection and applying the same principle you outlined above. I had to add the columns because the number of checkboxes are dynamic and they are inside a gallery. In your sample above, the sub-checkboxes are not inside a gallery.
Hi @Bochie ,
I did a test for you.
CheckBox1:
Default: B
OnCheck: Set(A,true);Reset(Checkbox1_1);Reset(Checkbox1_2);Reset(Checkbox1_3)
OnUncheck: Set(A,false);Reset(Checkbox1_1);Reset(Checkbox1_2);Reset(Checkbox1_3)
Checkbox1_1:
Default: A
OnUncheck: Set(B,false);Reset(Checkbox1)
Checkbox1_2:
Default: A
OnUncheck: Set(B,false);Reset(Checkbox1)
Checkbox1_3:
Default: A
OnUncheck: Set(B,false);Reset(Checkbox1)
Best Regards,
Wearsky
Thank you for your reply @v-xiaochen-msft ! I solved it last week by adding a boolean column "Show" to the collection and applying the same principle you outlined above. I had to add the columns because the number of checkboxes are dynamic and they are inside a gallery. In your sample above, the sub-checkboxes are not inside a gallery.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
197 | |
71 | |
48 | |
42 | |
30 |
User | Count |
---|---|
263 | |
121 | |
92 | |
87 | |
85 |