# UDT leasing

**URL:** <https://forum.inductiveautomation.com/t/udt-leasing/7375>\
**Category:** Ignition\
**Created:** [October 5, 2013, 8:21am UTC](https://forum.inductiveautomation.com/t/udt-leasing/7375 "2013-10-05T08:21:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Powerplan](https://avatars.discourse-cdn.com/v4/letter/p/aca169/32.png) [@Powerplan](https://forum.inductiveautomation.com/u/Powerplan)\
**Post date:** [October 5, 2013, 8:21am UTC](https://forum.inductiveautomation.com/t/udt-leasing/7375/1 "2013-10-05T08:21:50Z")

</div>

Morning

We have a project with a landing page that has about 120 small templates, each mapped to a UDT. Each template is clickable and takes the user to another more detailed overview of that particular area with more templates, each of these are clickable and go to page size template, on the large template there is an edit button to access editable items such as severity of alarms, device names etc. All of this works but the landing page and local overview pages can be slow to load, each UDT has at least 30 tags, some 50 or more.

The templates on the landing page only require half a dozen tags to display, I was wondering if I can make a small UDT and reference this in a larger UDT, ( know I could use indirect bindings but I’d rather not) so that I only lease the tags required on the landing page.

I haven’t tried parent and child UDTs, If I reference only the child on a template, will it lease the parent? if not thats good so how would I pass the parameters of the Parent, scripting? somthing like:-

```auto
param1 = event.source.littleUDT
param2 = tagPath of BigUDT

system.nav.openWindow('Main Window (1)', {'LittleUDT' : param1, 'BigUDT' : parm2})
```

I’ll think about this over the weekend.

Any thoughts?

---

<div class="post-metadata">

**Author:** ![Powerplan](https://avatars.discourse-cdn.com/v4/letter/p/aca169/32.png) [@Powerplan](https://forum.inductiveautomation.com/u/Powerplan)\
**Post date:** [October 5, 2013, 6:14pm UTC](https://forum.inductiveautomation.com/t/udt-leasing/7375/2 "2013-10-05T18:14:33Z")

</div>

Evening

OK so

```auto
param1 = event.source.littleUDT
param2 = tagPath of BigUDT

system.nav.openWindow('Main Window (1)', {'LittleUDT' : param1, 'BigUDT' : parm2})
```

is not going to fly, param2 is not going to reslove in to a UDT, using system.tag.read is not going to help either.

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [October 7, 2013, 9:34pm UTC](https://forum.inductiveautomation.com/t/udt-leasing/7375/3 "2013-10-07T21:34:50Z")

</div>

For this sort of thing if you are using UDTs, then I’d create nested templates. That way you can pass in what information you want and use whatever granularity is required. You could also use Indirect Tag bindings that reference members of the UDTs so the whole UDT isn’t leased.

---

<div class="post-metadata">

**Author:** ![Powerplan](https://avatars.discourse-cdn.com/v4/letter/p/aca169/32.png) [@Powerplan](https://forum.inductiveautomation.com/u/Powerplan)\
**Post date:** [October 8, 2013, 8:21pm UTC](https://forum.inductiveautomation.com/t/udt-leasing/7375/4 "2013-10-08T20:21:12Z")

</div>

Robert

thanks for the info

Do you have an example of “nested templates” so I can understand the UDT structure?

Thanks

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [October 8, 2013, 9:00pm UTC](https://forum.inductiveautomation.com/t/udt-leasing/7375/5 "2013-10-08T21:00:52Z")

</div>

Yeah, you can add a new tag manually in the Data Type Editor and just choose a ‘Data Type Instance’ instead of New OPC, New Memory Tag, etc.  
[attachment=0]Capture.PNG[/attachment]

---

<div class="post-metadata">

**Author:** ![Powerplan](https://avatars.discourse-cdn.com/v4/letter/p/aca169/32.png) [@Powerplan](https://forum.inductiveautomation.com/u/Powerplan)\
**Post date:** [October 9, 2013, 5:30pm UTC](https://forum.inductiveautomation.com/t/udt-leasing/7375/6 "2013-10-09T17:30:35Z")

</div>

Robert

well that’s simple,

just so I completely understand, using your example, if New Member/bit 0 was part of a template. would the whole Motor UDT be leased or just the New Member part or just the bit 0.

conversely if Motor UDT/Amps was part of a template but no reference to New Member , would New Member be leased,

Just trying to understand the dynamics.

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [October 9, 2013, 8:32pm UTC](https://forum.inductiveautomation.com/t/udt-leasing/7375/7 "2013-10-09T20:32:50Z")

</div>

If you are using a specific instance of the ‘N7 Bits/bit 0’ in your template, then only that would be leased. If you have a UDT property in your template that is an ‘N7 Bits’ type, then all of the members of the ‘N7 Bits’ will be subscribed.

If you have ‘Motor UDT/Amps’ in your template, then it will only subscribe to that one, but if you have a ‘Motor UDT’ type in your template, then all of the Motor UDT (including the N7 Bits instance) will be subscribed.

---

<div class="post-metadata">

**Author:** ![Powerplan](https://avatars.discourse-cdn.com/v4/letter/p/aca169/32.png) [@Powerplan](https://forum.inductiveautomation.com/u/Powerplan)\
**Post date:** [October 12, 2013, 7:21pm UTC](https://forum.inductiveautomation.com/t/udt-leasing/7375/8 "2013-10-12T19:21:56Z")

</div>

Robert

OK, I’ve had a play with this and I can do what I need to do, thanks for the help, I made a string on the larger template that produced the “larger” UDT address and then use indirect binding

Many thanks
