# Not able to edit perspective table cells after applying the color transform script

**URL:** <https://forum.inductiveautomation.com/t/not-able-to-edit-perspective-table-cells-after-applying-the-color-transform-script/52060>\
**Category:** Ignition\
**Created:** [October 18, 2021, 3:26pm UTC](https://forum.inductiveautomation.com/t/not-able-to-edit-perspective-table-cells-after-applying-the-color-transform-script/52060 "2021-10-18T15:26:37Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![pkhoshroo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pkhoshroo/32/26801_2.png) [@pkhoshroo](https://forum.inductiveautomation.com/u/pkhoshroo)\
**Post date:** [October 20, 2021, 2:49pm UTC](https://forum.inductiveautomation.com/t/not-able-to-edit-perspective-table-cells-after-applying-the-color-transform-script/52060/12 "2021-10-20T14:49:09Z")

</div>

So @cmallonee has replied to my question in another thread so I am posting his solution here for further refrences:

That solved the issue 🙂 Thank you @cmallonee !

> [@Change style of cell (component Table) via script - Perspective](https://forum.inductiveautomation.com/t/change-style-of-cell-component-table-via-script-perspective/44573/15):
>
> > [@Change style of cell (component Table) via script - Perspective](https://forum.inductiveautomation.com/t/change-style-of-cell-component-table-via-script-perspective/44573/14):
> >
> > as soon as I apply the cell color to that script, I get this error:
> > 
> > > **setValue(): 1st arg can’t be coerced to com.inductiveautomation.ignition.common.Dataset**
> 
> This is because the data of the table is a list - not a Dataset. It’s important to remember that targeted cell styling is not compatible with datasets, so you previously converted the `data` property of the table to a list of objects in order to apply styling.
> 
> You’re encountering this error because you’re treating your data in an inadvisable manner. I recommend only having one data source for area of data. In your current code, you’re treating a `view.custom.part.spec.data` as the source for your table, but then you’re treating the table as the basis for updating the view property. Try this instead:
> 
> ```auto
> rowIndex=event.row # row number of the commit
> colName=event.column # column name of the commit
> newValue=event.value
> # Below, I've referenced the source-of-truth dataset instead of the "translated" props.data of the Table
> data = self.view.custom.part.spec.data # Dataset [86R ? 8C]	
> newData = system.dataset.setValue(data, rowIndex,colName,newValue)
> self.view.custom.part.spec.data = newData
> 
> ```
> 
> Even this approach, however, assumes that the custom property is not a binding, which I suspect it is. If that property is the result of a binding, then you should be editing whatever source drives that binding (perhaps a query to update a SQL table).

---

_[View the full topic](https://forum.inductiveautomation.com/t/not-able-to-edit-perspective-table-cells-after-applying-the-color-transform-script/52060)._
