# Modify element of tag array from table cell

**URL:** <https://forum.inductiveautomation.com/t/modify-element-of-tag-array-from-table-cell/93041>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [July 10, 2024, 9:52pm UTC](https://forum.inductiveautomation.com/t/modify-element-of-tag-array-from-table-cell/93041 "2024-07-10T21:52:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![simeonw](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@simeonw](https://forum.inductiveautomation.com/u/simeonw)\
**Post date:** [July 11, 2024, 1:47am UTC](https://forum.inductiveautomation.com/t/modify-element-of-tag-array-from-table-cell/93041/2 "2024-07-11T01:47:48Z")

</div>

I see you have defined the tag data type as a STRING. You might be better to read the tag in as a Document (JSON) data type, as that is how Ignition OPC UA reads in and write to structs.

> [@OPC UA struct data type?](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905/2):
>
> You can take advantage of reading whole structs in OPC UA servers as of Ignition 7.9.12 and 8.0.0. When you bring the tag in you’ll notice Ignition presents a JSON value. The strategy here is a little involved but it works. For each of the UDTs you’ll be subscribing to in the PLC you make a corresponding UDT in Ignition. It should have a “Source” OPC tag member that will correspond to the Node with the struct value in the server and as a result have a JSON value in Ignition. Then for each memb…

You are also attempting to write the **data** prop directly to the tag. I imagine this would be a dataset, rather than JSON, based on the function you are using to modify the data in run data.

If you look at the **QualityCode** returned by the **system.tag.writeBlocking** , you will likely see that it has failed to write to the tag. Try converting your table dataset back to JSON and then writing that to the tag.

As a quick check, you could dump the live tag value in the script console, then also dump the updated value that you are writing back and check whether the structures match.

---

_[View the full topic](https://forum.inductiveautomation.com/t/modify-element-of-tag-array-from-table-cell/93041)._
