# Access UDT parameter in script

**URL:** <https://forum.inductiveautomation.com/t/access-udt-parameter-in-script/27824>\
**Category:** Ignition\
**Created:** [August 28, 2019, 7:55am UTC](https://forum.inductiveautomation.com/t/access-udt-parameter-in-script/27824 "2019-08-28T07:55:45Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![dawei.liu](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@dawei.liu](https://forum.inductiveautomation.com/u/dawei.liu)\
**Post date:** [September 2, 2019, 3:33am UTC](https://forum.inductiveautomation.com/t/access-udt-parameter-in-script/27824/18 "2019-09-02T03:33:41Z")

</div>

Just as Kevin’s suggestion in [jsonSet workaround in script](http://forum.inductiveautomation.com/t/jsonset-workaround-in-script/27560/2)

I just tested that it’s possible to write back the struct value through script (Ignition version 8.0.4 Nightly)

With below script, the UDT member ‘param1’ of ‘OPC\_tag’ can be updated and writen back to OPCUA server.

value1 = system.tag.read(‘OPC\_tag’).value  
value1 = system.util.jsonDecode(str(value1))  
value1[‘param1’] = ‘updated\_param1\_value’  
value2 = system.util.jsonEncode(value1)  
system.tag.write(‘OPC\_tag’, value2)

---

_[View the full topic](https://forum.inductiveautomation.com/t/access-udt-parameter-in-script/27824)._
