# "Write" or "Overwrite" a dataset custom property

**URL:** <https://forum.inductiveautomation.com/t/write-or-overwrite-a-dataset-custom-property/37071>\
**Category:** Ignition\
**Created:** [July 24, 2020, 9:16pm UTC](https://forum.inductiveautomation.com/t/write-or-overwrite-a-dataset-custom-property/37071 "2020-07-24T21:16:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [July 24, 2020, 9:16pm UTC](https://forum.inductiveautomation.com/t/write-or-overwrite-a-dataset-custom-property/37071/1 "2020-07-24T21:16:52Z")

</div>

Good afternoon,

I am struggling with the syntax to achieve the following.

I would like to read a custom property on the Root container of my screen. This dataset initially contains a table of 3 rows, 2 columns. I read the 6 values into my actionPerformed button and do some stuff with the information. Finally I write the 6 values back to the dataset.

Will this dataset automatically reset if I restart or save the client?  
What is the syntax to achieve this?

```
rect[0] = event.source.parent.ds_Cycle.getValueAt(0, 0)
rect[1] = event.source.parent.ds_Cycle.getValueAt(1, 0)
rect[2] = event.source.parent.ds_Cycle.getValueAt(2, 0)
temp[0] = event.source.parent.ds_Cycle.getValueAt(0, 1)
temp[1] = event.source.parent.ds_Cycle.getValueAt(1, 1)
temp[2] = event.source.parent.ds_Cycle.getValueAt(2, 1)

#do stuff with values

data = []

for x in range(3):
    data.append([rect[x], rect[y]])

event.source.parent.ds_Cycle.data = system.dataset.toDataSet(data)

```

The above code says the last line cannot be coerced to dataset.

---

<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:** [July 24, 2020, 9:20pm UTC](https://forum.inductiveautomation.com/t/write-or-overwrite-a-dataset-custom-property/37071/2 "2020-07-24T21:20:42Z")

</div>

[`toDataSet`](https://docs.inductiveautomation.com/display/DOC80/system.dataset.toDataSet) can only be called with a single argument if you already have a `PyDataset` - constructing the shame data “shape” (lists of lists) is not sufficient. Your call should work if you call it with the two argument syntax:

```auto
event.source.parent.ds_Cycle.data = system.dataset.toDataSet(event.source.parent.ds_Cycle.columnNames, data)

```
