# Error when attempting to edit a boolean value linked to a MySQL database

**URL:** <https://forum.inductiveautomation.com/t/error-when-attempting-to-edit-a-boolean-value-linked-to-a-mysql-database/74977>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [June 13, 2023, 7:33pm UTC](https://forum.inductiveautomation.com/t/error-when-attempting-to-edit-a-boolean-value-linked-to-a-mysql-database/74977 "2023-06-13T19:33:58Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 13, 2023, 8:25pm UTC](https://forum.inductiveautomation.com/t/error-when-attempting-to-edit-a-boolean-value-linked-to-a-mysql-database/74977/7 "2023-06-13T20:25:52Z")

</div>

Datasets aren't directly mutable.  
You need to change your script to something like:  
`self.props.data = system.dataset.setValue(self.props.data, event.row, event.column, event.value)`  
Or change your query return type to JSON so that the table data is "exploded" into a JSON like format this is directly mutable.

Note that doing _either_ of those things will still only update _the local data_. If you want to update the actual table in your database, you need a more involved script; you should run an UPDATE query from `onEditCellCommit` and then `refresh("props.data")` once you've issue the update.

---

_[View the full topic](https://forum.inductiveautomation.com/t/error-when-attempting-to-edit-a-boolean-value-linked-to-a-mysql-database/74977)._
