# Dynamic Update of Dataset in UDT Instance

**URL:** <https://forum.inductiveautomation.com/t/dynamic-update-of-dataset-in-udt-instance/12607>\
**Category:** Ignition\
**Created:** [January 26, 2017, 3:14pm UTC](https://forum.inductiveautomation.com/t/dynamic-update-of-dataset-in-udt-instance/12607 "2017-01-26T15:14:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnicoll](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dnicoll](https://forum.inductiveautomation.com/u/dnicoll)\
**Post date:** [January 26, 2017, 3:14pm UTC](https://forum.inductiveautomation.com/t/dynamic-update-of-dataset-in-udt-instance/12607/1 "2017-01-26T15:14:17Z")

</div>

I am probably missing something simple here. I have a UDT with and OPC Tag and a Dataset in it. I want to use the on change event on the OPC Tag to run a script which will do a bunch of OPC Reads and populate the DataSet. The Initial OPC Tag being the number of rows in the DataSet. Is this possible? All the examples I have found are referring to the older event handing system.

Thanks in Advance

---

<div class="post-metadata">

**Author:** ![anna](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@anna](https://forum.inductiveautomation.com/u/anna)\
**Post date:** [February 3, 2017, 6:29pm UTC](https://forum.inductiveautomation.com/t/dynamic-update-of-dataset-in-udt-instance/12607/2 "2017-02-03T18:29:55Z")

</div>

You should be able to write to the dataset tag from a Value Changed event script on another tag.  
Here is the basic structure:  
[attachment=0]img2.PNG[/attachment]  
One caveat is that if you are not using an up to date version of Ignition (7.9.1 or 7.8.5), you may be running into a bug with updating dataset tags.

What code have you tried? What exactly is not working?

---

<div class="post-metadata">

**Author:** ![dnicoll](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dnicoll](https://forum.inductiveautomation.com/u/dnicoll)\
**Post date:** [April 12, 2017, 8:31am UTC](https://forum.inductiveautomation.com/t/dynamic-update-of-dataset-in-udt-instance/12607/3 "2017-04-12T08:31:24Z")

</div>

Anna,

Thanks for your reply, I have been busy looking at other things recently. Unfortunately I don’t seem to be able to open your attached picture.

Thanks

---

<div class="post-metadata">

**Author:** ![michael.palmer](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@michael.palmer](https://forum.inductiveautomation.com/u/michael.palmer)\
**Post date:** [May 1, 2017, 6:56pm UTC](https://forum.inductiveautomation.com/t/dynamic-update-of-dataset-in-udt-instance/12607/4 "2017-05-01T18:56:23Z")

</div>

just curious more than anything, but the attached image is not displaying with the new forum.
