# String Manipulation in Template From UDT Data

**URL:** <https://forum.inductiveautomation.com/t/string-manipulation-in-template-from-udt-data/6002>\
**Category:** Ignition\
**Created:** [March 10, 2013, 12:19am UTC](https://forum.inductiveautomation.com/t/string-manipulation-in-template-from-udt-data/6002 "2013-03-10T00:19:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bcgibbens](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@bcgibbens](https://forum.inductiveautomation.com/u/bcgibbens)\
**Post date:** [March 10, 2013, 12:19am UTC](https://forum.inductiveautomation.com/t/string-manipulation-in-template-from-udt-data/6002/1 "2013-03-10T00:19:34Z")

</div>

I’m trying to populate the Text Field of a label with the Address of a PLC Item from the OPCItemPath. The problem I’m having is you cannot directly access the Meta Data of a UDT in a Template. I’ve added my UDT to the Template as a parameter and I can indirectly access the Meta Data using the indirect tag feature and then pointing to the Tag.OPCItemPath. However, I wanted to use the expression binding and use the Right Fucntion to strip off the Address in the PLC for populating the Label. I can’t seem to find a work around?

Any ideas?? ![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:")

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [March 11, 2013, 2:04am UTC](https://forum.inductiveautomation.com/t/string-manipulation-in-template-from-udt-data/6002/2 "2013-03-11T02:04:10Z")

</div>

You can indirectly address meta values of a tag in an expression binding like this:`toStr(tag("Path/To/Some/" + {Root Container.TagName} + ".OPCItemPath"))`

---

<div class="post-metadata">

**Author:** ![bcgibbens](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@bcgibbens](https://forum.inductiveautomation.com/u/bcgibbens)\
**Post date:** [March 11, 2013, 8:23pm UTC](https://forum.inductiveautomation.com/t/string-manipulation-in-template-from-udt-data/6002/3 "2013-03-11T20:23:34Z")

</div>

Thanks Travis. I’ll try that. I didn’t know you can concatenate inside an expression in the Scripting editor. I guess I need to look more at the syntax of your expression editor. I’ll let you know.

---

<div class="post-metadata">

**Author:** ![bcgibbens](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@bcgibbens](https://forum.inductiveautomation.com/u/bcgibbens)\
**Post date:** [March 11, 2013, 8:59pm UTC](https://forum.inductiveautomation.com/t/string-manipulation-in-template-from-udt-data/6002/4 "2013-03-11T20:59:27Z")

</div>

I modified the Strings a little and it did work!

Thanks!!
