# How do I pass a tag to a UDT for us in an expression in 8.1

**URL:** <https://forum.inductiveautomation.com/t/how-do-i-pass-a-tag-to-a-udt-for-us-in-an-expression-in-8-1/66109>\
**Category:** Ignition\
**Tags:** ignition79, ignition80\
**Created:** [November 4, 2022, 12:59am UTC](https://forum.inductiveautomation.com/t/how-do-i-pass-a-tag-to-a-udt-for-us-in-an-expression-in-8-1/66109 "2022-11-04T00:59:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Young](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dave_young/32/3466_2.png) [@Dave\_Young](https://forum.inductiveautomation.com/u/Dave_Young)\
**Post date:** [November 4, 2022, 12:59am UTC](https://forum.inductiveautomation.com/t/how-do-i-pass-a-tag-to-a-udt-for-us-in-an-expression-in-8-1/66109/1 "2022-11-04T00:59:57Z")

</div>

In Ignition 7.9 I could create a string parameter on a UDT and pass it the address of a tag then use that in an expression.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/7/7720197c4801ebcaf853cccccfe3a447513e10f9.png)  
Then  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/d/6d8d3167961aca880b2fe5840d04600e40cb80a2.png)  
And the expression evaluates correctly.

This doesn't work in 8.1. It doesn't seam to evaluate the parameter in the same way.

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

Is there a different way in 8.1 to pass a tag to a UDT for use in an expression?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 4, 2022, 5:03am UTC](https://forum.inductiveautomation.com/t/how-do-i-pass-a-tag-to-a-udt-for-us-in-an-expression-in-8-1/66109/2 "2022-11-04T05:03:48Z")

</div>

Your source is a string. If you want to read the value of it, you need to run it through the `tag()` function.  
e.g.

```auto
getBit(tag({Source}), {Offset})

```

It looks like you might want a derived tag though instead of an expression tag

---

<div class="post-metadata">

**Author:** ![Dave\_Young](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dave_young/32/3466_2.png) [@Dave\_Young](https://forum.inductiveautomation.com/u/Dave_Young)\
**Post date:** [November 4, 2022, 8:01am UTC](https://forum.inductiveautomation.com/t/how-do-i-pass-a-tag-to-a-udt-for-us-in-an-expression-in-8-1/66109/3 "2022-11-04T08:01:52Z")

</div>

That's what I needed. Just had to remove the braces {} and [~]. Thanks.

This is old code so predated derived tags. I'll look into it as I upgrade.
