# Quick help - editable Perspective Table

**URL:** <https://forum.inductiveautomation.com/t/quick-help-editable-perspective-table/31961>\
**Category:** Ignition\
**Created:** [February 5, 2020, 6:15pm UTC](https://forum.inductiveautomation.com/t/quick-help-editable-perspective-table/31961 "2020-02-05T18:15:15Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [March 5, 2020, 5:27pm UTC](https://forum.inductiveautomation.com/t/quick-help-editable-perspective-table/31961/3 "2020-03-05T17:27:27Z")

</div>

I'm far from an expert on the Perspective table, but I can probably answer some of these. @cmallonee may also be able to help 🙂

> [@](#):
>
> - Does editing a boolean work with the script:valueToSet = event.valueself.props.data[event.row][event.column] = valueToSet

That will (probably) update the _table's_ data, but won't actually commit anything to the database, as it looks like you noticed from your update script. It'll also get overridden the next time the query to populate the table runs.

> [@](#):
>
> - Do I need to have my ID column included for this to work?

Yes, I'd say you should only expect any kind of 'dynamic' editing to work if you've got a fixed ID column. You can retrieve it, but hide it from display, using some combination of properties in the columns property.

> [@](#):
>
> - Do I have to have all columns editable for this to work? I only want to edit the boolean column if possible.

I wouldn't think so.

> [@](#):
>
> - In preview mode it looks like it is not committing and the selection reverts back when I select another row. It also looks like I have to select the cell first before I can check the box. Assuming I get this to work and that behavior persists, is there a way around that?

That might just be a consequence of not 'really' committing the data back to the database.

> [@](#):
>
> ```auto
> r = event['row']
> c = event['column']
> v = event['value']
> 
> id = self.props.data[r].id
> 
> system.db.runPrepUpdate("UPDATE wtaccess SET access = ? WHERE id=?" [v, id]
> 
> self.refreshBinding("props.data")
> 
> ```

This looks like, at least roughly, the correct approach, although your syntax for `runPrepUpdate` is a little off; should be:  
`system.db.runPrepUpdate("UPDATE wtaccess SET access = ? WHERE id=?", [v, id])`

---

_[View the full topic](https://forum.inductiveautomation.com/t/quick-help-editable-perspective-table/31961)._
