# Edit Column Attributes Dataset

**URL:** <https://forum.inductiveautomation.com/t/edit-column-attributes-dataset/21120>\
**Category:** Ignition\
**Created:** [November 28, 2018, 7:50pm UTC](https://forum.inductiveautomation.com/t/edit-column-attributes-dataset/21120 "2018-11-28T19:50:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bellm](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@bellm](https://forum.inductiveautomation.com/u/bellm)\
**Post date:** [November 28, 2018, 7:50pm UTC](https://forum.inductiveautomation.com/t/edit-column-attributes-dataset/21120/1 "2018-11-28T19:50:53Z")

</div>

I am trying to edit a tables attributes with a button press script. But am getting the following error:

> File "event:mousePressed", line 2, in

> TypeError: setValue(): 1st arg can't be coerced to com.inductiveautomation.ignition.common.Dataset

> Ignition v7.9.9 (b2018081621)  
> Java: Oracle Corporation 1.8.0\_191

Here is the code I am trying to use:

```auto
table = event.source.parent.getComponent('Table').columnAttributesData
newData = system.dataset.setValue(table.data, 1, 'editable', 1)
table.data = newData

```

Is it possible to edit the attributes dataset?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [November 28, 2018, 7:56pm UTC](https://forum.inductiveautomation.com/t/edit-column-attributes-dataset/21120/2 "2018-11-28T19:56:37Z")

</div>

Take the .data off of your setValue call.  
You are assigning “table” to the column attribute dataset the line above it.

---

<div class="post-metadata">

**Author:** ![bellm](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@bellm](https://forum.inductiveautomation.com/u/bellm)\
**Post date:** [November 28, 2018, 7:59pm UTC](https://forum.inductiveautomation.com/t/edit-column-attributes-dataset/21120/3 "2018-11-28T19:59:05Z")

</div>

I tried that but when I do that I get the following

> File "event:mousePressed", line 3, in

> TypeError: can't convert Dataset [6R ? 30C] to [[Ljava.lang.Object;

---

<div class="post-metadata">

**Author:** ![JGJohnson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jgjohnson/32/29582_2.png) [@JGJohnson](https://forum.inductiveautomation.com/u/JGJohnson)\
**Post date:** [November 28, 2018, 8:17pm UTC](https://forum.inductiveautomation.com/t/edit-column-attributes-dataset/21120/4 "2018-11-28T20:17:22Z")

</div>

Take a look at this script. If you analyze it you should be able to see the places where your script went off track.

```auto
table = event.source.parent.getComponent('Table')
columnData = table.columnAttributesData
newData = system.dataset.setValue(columnData, 1, 'editable', 1)
table.columnAttributesData = newData

```
