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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,336)