# How to take table checkbox event

**URL:** <https://forum.inductiveautomation.com/t/how-to-take-table-checkbox-event/64226>\
**Category:** Ignition\
**Tags:** database, scripting, perspective\
**Created:** [September 19, 2022, 1:30pm UTC](https://forum.inductiveautomation.com/t/how-to-take-table-checkbox-event/64226 "2022-09-19T13:30:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felipe\_Deolindo](https://avatars.discourse-cdn.com/v4/letter/f/6a8cbe/32.png) [@Felipe\_Deolindo](https://forum.inductiveautomation.com/u/Felipe_Deolindo)\
**Post date:** [September 19, 2022, 1:30pm UTC](https://forum.inductiveautomation.com/t/how-to-take-table-checkbox-event/64226/1 "2022-09-19T13:30:28Z")

</div>

I have a table from `mysql` query, then in this table I have a `byte` fields, to make a checkbox in the ignition, what I want to do it’s, when I press the checkbox filed, run a query to update the value, to `true` or `false`, but I can’t even take the event, I don’t know where I have to put this trigger, when I clicked in this checkbox, don’t see neither property changed.  
Anyone can help?

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

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 19, 2022, 1:37pm UTC](https://forum.inductiveautomation.com/t/how-to-take-table-checkbox-event/64226/2 "2022-09-19T13:37:48Z")

</div>

You tagged the topic as Vision, but the screenshot is Perspective. Hmm?

---

<div class="post-metadata">

**Author:** ![Felipe\_Deolindo](https://avatars.discourse-cdn.com/v4/letter/f/6a8cbe/32.png) [@Felipe\_Deolindo](https://forum.inductiveautomation.com/u/Felipe_Deolindo)\
**Post date:** [September 19, 2022, 1:42pm UTC](https://forum.inductiveautomation.com/t/how-to-take-table-checkbox-event/64226/3 "2022-09-19T13:42:55Z")

</div>

sorry, my fault, I already changed

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 19, 2022, 2:24pm UTC](https://forum.inductiveautomation.com/t/how-to-take-table-checkbox-event/64226/4 "2022-09-19T14:24:23Z")

</div>

You need to configure a script in the `onEditCellCommit` event of the table.

In that script you can filter against the column and use `system.db.runNamedQuery()` or `system.db.runPrepUpdate()` to update the data source.

---

<div class="post-metadata">

**Author:** ![Felipe\_Deolindo](https://avatars.discourse-cdn.com/v4/letter/f/6a8cbe/32.png) [@Felipe\_Deolindo](https://forum.inductiveautomation.com/u/Felipe_Deolindo)\
**Post date:** [September 19, 2022, 3:05pm UTC](https://forum.inductiveautomation.com/t/how-to-take-table-checkbox-event/64226/5 "2022-09-19T15:05:07Z")

</div>

but, do you know how can I take this event from there?  
I try this, to take the event but without sucess  
`self.props.data.getValueAt(event.rowIndex, "isselected")` ,

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 19, 2022, 3:36pm UTC](https://forum.inductiveautomation.com/t/how-to-take-table-checkbox-event/64226/6 "2022-09-19T15:36:35Z")

</div>

Show all of your code in the `onEditCellCommit`.
