Hi there,
I have 4 checkboxes (out of a gallery etc) and a select all button.
if all are checked (with select all) and then i remove one tick , I want to be able to re-tick them all again with the Select All button.
I know i am nearly there but i just cannot seem to get the last issue i am having.
So Select All, on the OnCheck, i set some variables :
UpdateContext({AllChecked: true});
UpdateContext({AllUnChecked: false});
on the default value of each checkbox besides the select all . I have this formula to set the value :
If(
AllUnChecked,
false,
gblInspectionItemTPHVehicle.MOT = 'Yes or No'.Yes || AllChecked,
true
)
So if Allunchecked is false, it goes to the collection (all results are stored in a collection) on a save button. It checks if the checkbox in the collection is Yes OR the value of AllChecked -then true
So for example a test is :
1. Navigate to screen
2. Press Select All - All checkboxes are selected
3. Unselect some checkboxes
4 Press Select All - All checkboxes should be selected, but they are not
I reset all chx boxs onHidden on the page , so it will load it back up from the collection . I really am in need of urgent help on this issue, if anyone could help - brilliant 🙂
Happy to provide much more information as we go.
Cheers
Solved! Go to Solution.
hi @jdhough55 ,
you need to reupdate your variables back to false or true after it has checked all the checkboxes. I have linked an article that discusses a similar topic Here. Feel free to let me know if you're still having trouble and I can try to walk you through it.
------------------------------------------------------------------------------------------------------------------------------
Please click "Accept as Solution" if this post answered your question so that it is helpful for people having similar questions. If you found this post helpful smack that Thumbs up button! Thanks!
hi @jdhough55 ,
you need to reupdate your variables back to false or true after it has checked all the checkboxes. I have linked an article that discusses a similar topic Here. Feel free to let me know if you're still having trouble and I can try to walk you through it.
------------------------------------------------------------------------------------------------------------------------------
Please click "Accept as Solution" if this post answered your question so that it is helpful for people having similar questions. If you found this post helpful smack that Thumbs up button! Thanks!
Just posted this a week or so ago to someone with question, copy pasted my old response below
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
User | Count |
---|---|
163 | |
95 | |
77 | |
72 | |
58 |
User | Count |
---|---|
216 | |
166 | |
97 | |
96 | |
74 |