# Datasets in Memory Tags

**URL:** <https://forum.inductiveautomation.com/t/datasets-in-memory-tags/45545>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [April 13, 2021, 5:22pm UTC](https://forum.inductiveautomation.com/t/datasets-in-memory-tags/45545 "2021-04-13T17:22:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EduardoChega](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@EduardoChega](https://forum.inductiveautomation.com/u/EduardoChega)\
**Post date:** [April 13, 2021, 5:22pm UTC](https://forum.inductiveautomation.com/t/datasets-in-memory-tags/45545/1 "2021-04-13T17:22:33Z")

</div>

Hello,

I’m designing a new view on Perspective so that every time we want to update or add a new program for our CNC machines we can write to a memory tag with a dataset the information needed for the updated or new programs. The idea is to fill a couple of field texts and then click a button to “Save” the new values into the dataset in my memory tag. I’m a little lost on how to do it , any help or suggestion would be much appreciated.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 13, 2021, 6:54pm UTC](https://forum.inductiveautomation.com/t/datasets-in-memory-tags/45545/2 "2021-04-13T18:54:22Z")

</div>

```auto
# untested, but this should theoretically work
tagPath = "<provider>Your/Tag/Path"
original_dataset = system.tag.readBlocking([tagPath])[0].value
new_dataset = system.dataset.addRow(original_dataset, ["col1value", "col2value"])
system.tag.writeBlocking([tagPath],[new_dataset])

```

See the [docs](https://docs.inductiveautomation.com/display/DOC81/system.dataset.addRow).

---

<div class="post-metadata">

**Author:** ![EduardoChega](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@EduardoChega](https://forum.inductiveautomation.com/u/EduardoChega)\
**Post date:** [April 13, 2021, 7:31pm UTC](https://forum.inductiveautomation.com/t/datasets-in-memory-tags/45545/4 "2021-04-13T19:31:03Z")

</div>

Thank you very much for the quick response! I needed to do a minor change to the scrip to get it working because the addRow() instruction doesn’t take keyword arguments, this is how the script should be:

tagPath = “Your/Tag/Path”  
original\_dataset = system.tag.readBlocking([tagPath])[0].value  
new\_dataset = system.dataset.addRow(original\_dataset, [“Value1”, “Value2”])  
system.tag.writeBlocking([tagPath],[new\_dataset])
