cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jdhough55
Helper II
Helper II

Geoup of checkboxes and select All

Hi there, 

I have a selection of checkboxes and a main one called 'Select All' 

I want to be able to select them all with 'Select All'. 

I feel i can do that by adding the value of the Select All (value) to the default on the checkboxes - that works fine. 

I want to be able to also, if the user ticks all the boxes the Select All checkbox is also lit. 

 

I have done the 2nd part by : 

 

If (chcLicencePlateCEC.Value = true &&
chcWindowsWindscreenCEC.Value = true &&
chcWiperBladesAndWashersCEC.Value = true &&
chcAdvertisingSignageCEC.Value = true &&
chcTyresWheelsCEC.Value = true &&
chcMirrorsCEC.Value = true &&
chcRegistrationPlateCEC.Value = true &&
chcFrontLightsAndIndicatorsCEC.Value = true &&
chcRearLightsAndIndicatorsCEC.Value = true &&
chcUndersideCEC.Value = true &&
chcOtherCEC.Value = true,true)

 

In other words if all the Values of the checkboxes are true then add true to the Default on the Select All checkbox

I just cannot seem to get both Select All (with the tick box - and all of the chkboxs highlight) and if i select on all the checkboxes the 'select all' checkbox hightlights. 

 

Any idea / any test info would be really welcome. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
TheRobRush
Super User
Super User

Ok check it out

I have 6 check boxes

Checkbox2 is the check all

then 2_1-5 are the individuals

Checkbox2 default is 

If(
And(
Checkbox2_1.Value=true,
Checkbox2_2.Value=true,
Checkbox2_3.Value=true,
Checkbox2_4.Value=true,
Checkbox2_5.Value=true),
true,
false)

Checkbox 2 OnUncheck is

Set(checkallVar,false)

Checkbox2 OnCheck is

Set(checkallVar,true)

 

Both the oncheck and onuncheck of all 5 indivial check boxes will be 

Reset(Checkbox2)

and their default will be 

If(checkallVar=true,true,false)

 

with this checking checkall box wil check all, or uncheck all if unchecked, and when all are checked this box appears checked, while unchecking any box unchecks it. checking all boxes individually willl also check this box

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

View solution in original post

1 REPLY 1
TheRobRush
Super User
Super User

Ok check it out

I have 6 check boxes

Checkbox2 is the check all

then 2_1-5 are the individuals

Checkbox2 default is 

If(
And(
Checkbox2_1.Value=true,
Checkbox2_2.Value=true,
Checkbox2_3.Value=true,
Checkbox2_4.Value=true,
Checkbox2_5.Value=true),
true,
false)

Checkbox 2 OnUncheck is

Set(checkallVar,false)

Checkbox2 OnCheck is

Set(checkallVar,true)

 

Both the oncheck and onuncheck of all 5 indivial check boxes will be 

Reset(Checkbox2)

and their default will be 

If(checkallVar=true,true,false)

 

with this checking checkall box wil check all, or uncheck all if unchecked, and when all are checked this box appears checked, while unchecking any box unchecks it. checking all boxes individually willl also check this box

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,698)