# How can I choose multiple checkboxes from a table column?

**URL:** <https://forum.inductiveautomation.com/t/how-can-i-choose-multiple-checkboxes-from-a-table-column/89639>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 29, 2024, 4:11pm UTC](https://forum.inductiveautomation.com/t/how-can-i-choose-multiple-checkboxes-from-a-table-column/89639 "2024-04-29T16:11:44Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [April 29, 2024, 4:11pm UTC](https://forum.inductiveautomation.com/t/how-can-i-choose-multiple-checkboxes-from-a-table-column/89639/1 "2024-04-29T16:11:44Z")

</div>

Hello,

I´m trying to find a way to choose multiple checkboxes from a table column. Now I can only choose one.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/f/efa70c16afcc26587ef3472af2d7f51138f2f788.png)

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [April 29, 2024, 4:21pm UTC](https://forum.inductiveautomation.com/t/how-can-i-choose-multiple-checkboxes-from-a-table-column/89639/2 "2024-04-29T16:21:25Z")

</div>

What about sharing how this table is populated so folks can help without guessing?

For example, if you are trying to select MAD-FINDO and MAD-FINNU and that isn't working, then that isn't the table as much as how the table data is being presented.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 29, 2024, 4:30pm UTC](https://forum.inductiveautomation.com/t/how-can-i-choose-multiple-checkboxes-from-a-table-column/89639/3 "2024-04-29T16:30:04Z")

</div>

If you're trying to do something like "shift-click" over multiple checkboxes, you can not do that. If you have one checkbox selected and clicking another checkbox results in the first being un-checked, then you have an implementation issue which we can't help you with until you show us exactly what is being done to determine the state of the checkboxes in your dataset.

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [April 29, 2024, 4:49pm UTC](https://forum.inductiveautomation.com/t/how-can-i-choose-multiple-checkboxes-from-a-table-column/89639/4 "2024-04-29T16:49:11Z")

</div>

The table is populated with this named query:

0 "select" is the checkbox column

```python
SELECT A.ASSET "text",
        0 "select",
        TO_NUMBER(APA.PARENTASSET) "Zone",
        TS.ID_SEDE AS "id"        
...

```

wich is render as a boolean checkbox as Transistor taught me

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/c/4cf67de23bcf083f72123baf0990bda9ae0f3a39.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/5/752878789966001cceb1905240e68f0680331077.png)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 29, 2024, 4:57pm UTC](https://forum.inductiveautomation.com/t/how-can-i-choose-multiple-checkboxes-from-a-table-column/89639/5 "2024-04-29T16:57:03Z")

</div>

And so what do you expect to happen when you "check" a checkbox?

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [April 29, 2024, 5:11pm UTC](https://forum.inductiveautomation.com/t/how-can-i-choose-multiple-checkboxes-from-a-table-column/89639/6 "2024-04-29T17:11:48Z")

</div>

Aply that selection filter into another table, the current table isa popup window.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/2/1277282fac4a7c6837b76ce215d62c0ff6267593.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 29, 2024, 5:35pm UTC](https://forum.inductiveautomation.com/t/how-can-i-choose-multiple-checkboxes-from-a-table-column/89639/7 "2024-04-29T17:35:13Z")

</div>

When you edit a cell you need to Configure Event to update the `props.data`.

1. Make sure the query binding is Return Format is set to JSON.
2. On the Configure Event, onCellCommit add in the following script.  
`	self.props.data[event.row][event.column] = event.value`

That will update the table.

It will not generate the list of selected items for you. You will have to do that separately.

I think it's time you spend some time at

> **[Learn Ignition at Your Own Pace](https://inductiveuniversity.com/)**
>
> Learn SCADA software (and get a credential!) for free with Inductive
> University’s online Ignition SCADA courses, taught by industrial automation experts.

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [May 7, 2024, 7:04am UTC](https://forum.inductiveautomation.com/t/how-can-i-choose-multiple-checkboxes-from-a-table-column/89639/8 "2024-05-07T07:04:17Z")

</div>

I put my named query return format as json  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/3/b385aba8c155c098849e664cb17703cd08bacd4b.png)

and added

```python
self.props.data[event.row][event.column] = event.value

```

to my onEditCellCommit Event

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/5/75517b20d47f35d2647398d36595049ea7ee05ca.png)

but still cant choose multimple checkboxes on my table

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/6/76dd8d9ef46dec49edfe3a4680d4e1903dec2de9.png)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [May 8, 2024, 2:24pm UTC](https://forum.inductiveautomation.com/t/how-can-i-choose-multiple-checkboxes-from-a-table-column/89639/9 "2024-05-08T14:24:40Z")

</div>

I'm not surprised because the Table is bound against a Named Query. You need to use that onEditCellCommit Event to update the underlying data being queried, not write back to data which will be overwritten by a binding.

---

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [May 21, 2024, 9:06pm UTC](https://forum.inductiveautomation.com/t/how-can-i-choose-multiple-checkboxes-from-a-table-column/89639/10 "2024-05-21T21:06:06Z")

</div>

Your data, as a JSON object, should look like this:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/3/f348f1602d41911e4c888ede57460a9c1ab9d427.png)

The script `self.props.data[event.row][event.column] = event.value` changes this value:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/7/b7449140378a6033304419d49e92707cb69ebe71.png)

for each `checkbox` selected.  
Then, in a separate script, such as a button event, you can collect all the "selected" rows by (I think) using a `Py dataset` and sending that data to where it needs to go.

@Alejandro_Alaco This is the code I wrote to use an `SQL INSERT` statement to insert into some random table:

```python
def runAction(self, event):
	set1 = self.parent.custom.data_out
	set2 = {}
	for row in set1:
		if row['Checkbox'] == True:
			set2['Checked'] = row['Checkbox']
			set2['ID'] = row['SectionID']
			set2['Name'] = row['SectionName']
			query = "TEST/Insert_Table4"
			params = {"p_Checked":set2['Checked'], "p_ID":set2['ID'], "p_Name":set2['Name']}
			system.db.runNamedQuery(query, params)

```
