# Link UDT property in template to nested UDT?

**URL:** <https://forum.inductiveautomation.com/t/link-udt-property-in-template-to-nested-udt/16075>\
**Category:** Ignition\
**Created:** [November 21, 2017, 3:53pm UTC](https://forum.inductiveautomation.com/t/link-udt-property-in-template-to-nested-udt/16075 "2017-11-21T15:53:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![abishur](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/abishur/32/9096_2.png) [@abishur](https://forum.inductiveautomation.com/u/abishur)\
**Post date:** [November 21, 2017, 3:53pm UTC](https://forum.inductiveautomation.com/t/link-udt-property-in-template-to-nested-udt/16075/1 "2017-11-21T15:53:32Z")

</div>

I have a template that I’m needing to modify. It has a TON of objects linked to a UDT. Because of reasons I had to take the UDT it was linked to and make it a member of a new UDT. Is there a way I can link the existing UDT property in my template to the Nested UDT?

To put it a different way:  
I have a Parent UDT named “Bob”  
Bob has an UDT Instance named “Tom”, let’s call it TomMaster

On a template I have a property of type “Tom”, let’s call it TomInstance  
On the same template I have placed a custom property of type “Bob”, let’s call it BobInstance

Is there way to link TomIntance to the nested UDT of similar type within Bob?

I’ve tried to use indirect tag mapping using the following formats:  
{1}.TomMaster  
{1}/TomMaster  
{1}::TomMaster

where {1} was linked to Root\_Container…BobInstance

I think the problem I’m seeing is that when I try to link it to a property and select TomMaster, I can’t because Ignition views TomMaster not as a UDT instance or property, but as a folder. Is there a way around this or am I just going to have to grab a beer and pizza and do this the long way where I change each binding to use the new structure?

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [November 21, 2017, 9:29pm UTC](https://forum.inductiveautomation.com/t/link-udt-property-in-template-to-nested-udt/16075/2 "2017-11-21T21:29:38Z")

</div>

I’m not sure I understand 100% but I’ve given it a shot here. I think switching to expression binding for this will work well.

So you want to access a UDT of type Tom that is inside the UDT Bob, on a template. Try this in the expression binding of TomInstance:

`tag({Root Container.TomInstance::Meta.TagPath} + "/TomMaster")`

---

<div class="post-metadata">

**Author:** ![abishur](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/abishur/32/9096_2.png) [@abishur](https://forum.inductiveautomation.com/u/abishur)\
**Post date:** [November 28, 2017, 8:32pm UTC](https://forum.inductiveautomation.com/t/link-udt-property-in-template-to-nested-udt/16075/3 "2017-11-28T20:32:49Z")

</div>

Thanks for the response, I’ve tried this a couple different ways, and it never would work for me. Unfortunately I haven’t had time to really investigate if it was just a problem with how I was doing it. For time’s sake, I just had to do a find and replace on the screen to update the scripts.

---

<div class="post-metadata">

**Author:** ![a.ansari](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@a.ansari](https://forum.inductiveautomation.com/u/a.ansari)\
**Post date:** [November 17, 2018, 12:00am UTC](https://forum.inductiveautomation.com/t/link-udt-property-in-template-to-nested-udt/16075/4 "2018-11-17T00:00:24Z")

</div>

I am having a similar issue. Is there a workaround to bind nested UDT property to a nested Template that expects it?

I tried the Expression binding as suggested but it did not resolve the issue.

> **[Inductive Automation's Ignition: Tips, Tricks, and Cheats-How To Use Nested...](https://www.hallam-ics.com/blog/inductive-automations-ignition-tips-tricks-and-cheats-how-to-use-nested-udt-tags-within-templates)**
>
> A step-by-step guide to incorporating Rockwell Automation’s PlantPAx object library with Inductive Automation’s SCADA system.

This article describes the issue, although the solution suggested in this article is not feasible for me. I have various templates and changing them all to indirect tag instead of UDTs will be a lot of re-work.

Is there a way to bind to nested UDTs?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [November 17, 2018, 3:33pm UTC](https://forum.inductiveautomation.com/t/link-udt-property-in-template-to-nested-udt/16075/5 "2018-11-17T15:33:28Z")

</div>

If you put a custom property on the template of the parent UDT type, you should be able to browse down into the nested UDT using a property binding. In the picture below I created a test UDT called NestedUDT, inside that UDT I nested another UDT called Fault. You can see in the picture that you can just drill down into the Fault nested UDT and select a field.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b17d79e870fb7d0df8fa7b8d38ef2f57a0dc30e7.PNG)

---

<div class="post-metadata">

**Author:** ![a.ansari](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@a.ansari](https://forum.inductiveautomation.com/u/a.ansari)\
**Post date:** [November 19, 2018, 3:47pm UTC](https://forum.inductiveautomation.com/t/link-udt-property-in-template-to-nested-udt/16075/6 "2018-11-19T15:47:34Z")

</div>

Thank you for your response. I would like to bind to the entire UDT property, in your e.g: Fault. As your example shows the nested UDT named Fault is not recognized as a UDT (but a folder) and hence cannot be bound to.  
Any other ides? or workarounds?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [November 19, 2018, 4:06pm UTC](https://forum.inductiveautomation.com/t/link-udt-property-in-template-to-nested-udt/16075/7 "2018-11-19T16:06:09Z")

</div>

I would create a second custom property on the template but make it an internal custom property.  
Make it of the sub UDT Type, then you can bind it to the template by browsing to the sub tag in the tag tree.

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/807fa0bcd018d87056e463dbeb7df54ee7a291ec.PNG)  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/557850865e573b6c255cb0900c052bfc73d8ae74.PNG) ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/f96ded2d263cad8dec80e75b30d4a435e2463e8a.PNG)

---

<div class="post-metadata">

**Author:** ![a.ansari](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@a.ansari](https://forum.inductiveautomation.com/u/a.ansari)\
**Post date:** [November 19, 2018, 4:18pm UTC](https://forum.inductiveautomation.com/t/link-udt-property-in-template-to-nested-udt/16075/8 "2018-11-19T16:18:22Z")

</div>

OK. Will give that a shot. Thanks a bunch

---

<div class="post-metadata">

**Author:** ![a.ansari](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@a.ansari](https://forum.inductiveautomation.com/u/a.ansari)\
**Post date:** [November 19, 2018, 4:45pm UTC](https://forum.inductiveautomation.com/t/link-udt-property-in-template-to-nested-udt/16075/9 "2018-11-19T16:45:45Z")

</div>

Just to make sure I understand, it seems like if I bind the internal property from the tag tree then it will be statically bound to that tag from the global tag tree.  
Did I miss something?
