# Passing Tags to UDT parameters

**URL:** <https://forum.inductiveautomation.com/t/passing-tags-to-udt-parameters/95086>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [August 23, 2024, 4:06pm UTC](https://forum.inductiveautomation.com/t/passing-tags-to-udt-parameters/95086 "2024-08-23T16:06:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin\_Granger](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@Justin\_Granger](https://forum.inductiveautomation.com/u/Justin_Granger)\
**Post date:** [August 23, 2024, 4:06pm UTC](https://forum.inductiveautomation.com/t/passing-tags-to-udt-parameters/95086/1 "2024-08-23T16:06:33Z")

</div>

I'm having problems passing a tag to a UDT parameter. I have a expression tag that calculated the OPC tag address. I then need to pass that tag as a UDT parameter to a OPC tag that reads it. If I use the following Syntax in an expression it will read the tag {[.]../Current\_Value\_Reg}. If I use this same syntax I get a null for the parameter value. I even tried typing out the full path with no luck. I have done this before on version 7.9.7. I'm currently using 8.1.42. Any ideas on what I'm doing wrong? Thanks.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [September 4, 2024, 9:31pm UTC](https://forum.inductiveautomation.com/t/passing-tags-to-udt-parameters/95086/2 "2024-09-04T21:31:01Z")

</div>

This sounds like a rather weird thing to do, but anyway...

Try using a `tagChange` script on the `Current_Value_Reg` to write the parameter?

like so:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/2/92245b94d4c19fc009d061ee0c43cb6ac5529460.png)

`Nested_OPC_Path` scripting:

```python
def valueChanged(tag, tagPath, previousValue, currentValue, initialChange, missedEvents):
	if currentValue.value:
		system.tag.writeBlocking(['[.]Nested_Val/Parameters.path'], [currentValue.value])

```

works. I was able to replicate the `null` behavior you saw as well.
