# Checkbox for checking/unchecking all checkboxes

**URL:** <https://forum.inductiveautomation.com/t/checkbox-for-checking-unchecking-all-checkboxes/58210>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 8, 2022, 10:32am UTC](https://forum.inductiveautomation.com/t/checkbox-for-checking-unchecking-all-checkboxes/58210 "2022-04-08T10:32:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Herman\_Lundberg](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@Herman\_Lundberg](https://forum.inductiveautomation.com/u/Herman_Lundberg)\
**Post date:** [April 8, 2022, 10:32am UTC](https://forum.inductiveautomation.com/t/checkbox-for-checking-unchecking-all-checkboxes/58210/1 "2022-04-08T10:32:52Z")

</div>

Do you know of a better way to create this functionality?

I have a list of task, where each task has it’s own checkbox (Ugn 41, Ugn 42, etc). I have added a single checkbox that with a script checks/unchecks all the checkboxes of the list (Checkbox “Alla”). The user can then with one checkbox check/uncheck all the tasks at the same time. I further added a function so that if the user unchecks one of the tasks manually, the checkbox that can check/uncheck all task, is then unchecked as well.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/d/ad44bd295df1fa0f50b5b768087ef162e57048bd.png)

The way I did this was first by creating a template for the task, since the amount of tasks shall be dynamic. I then populated a flex repeater with a number of forementioned task-templates. (In the image, Ugn 41, Ugn 42, and so on, are inside the flex repeater). The check/uncheck all checkbox was added manually to the view. Since I can’t get to properties of components in a flexrepeater (other than through params) I added the script that registers clicks of the checkbox in the template and let it set the state of a session param which I bound to the check/uncheck all checkbox.

My solution works fine, but it feels like the flex repeater makes me run laps around it all to get the functionality I want.

So any one that made this functionality in cleaner manner?
