# Returning a UDT from a system.tag.read()

**URL:** <https://forum.inductiveautomation.com/t/returning-a-udt-from-a-system-tag-read/20678>\
**Category:** Ignition\
**Tags:** ignition79, scripting\
**Created:** [November 8, 2018, 6:02pm UTC](https://forum.inductiveautomation.com/t/returning-a-udt-from-a-system-tag-read/20678 "2018-11-08T18:02:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdecelles](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bdecelles/32/5713_2.png) [@bdecelles](https://forum.inductiveautomation.com/u/bdecelles)\
**Post date:** [November 8, 2018, 6:02pm UTC](https://forum.inductiveautomation.com/t/returning-a-udt-from-a-system-tag-read/20678/1 "2018-11-08T18:02:11Z")

</div>

Hi,

I’m trying to build a template that takes a UDT and displays the information for the tags within that UDT. Pretty simple, but the problem comes when I try to use this template in a template repeater and also set the template up to have a drop target of a UDT.

The template has a path property that indirectly reads the UDT from the tag path, and this works really well in a template repeater. I have a script that performs a tag browse on all UDTs in a certain folder and returns the path for each udt.

What I would like to do is change the template custom property from a string to the UDT type, so I can set it as a drop target and be able to place the same template in other areas without a repeater. The problem with this is I can’t figure out how to return a UDT object from a script. system.tag.readAll returns null for all the UDTs even though I can verify that the path is correct.

I know I can create a separate template that does the same thing, but used in each context (repeater and drop target), but wanted to check if I wasn’t doing something correctly before I go down that route.

---

<div class="post-metadata">

**Author:** ![bdecelles](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bdecelles/32/5713_2.png) [@bdecelles](https://forum.inductiveautomation.com/u/bdecelles)\
**Post date:** [November 8, 2018, 6:55pm UTC](https://forum.inductiveautomation.com/t/returning-a-udt-from-a-system-tag-read/20678/2 "2018-11-08T18:55:57Z")

</div>

So it would seem that the approach I want is going to make my screens un-responsive. I'm still curious if it is possible though.

> [@Template using UDT param: Can you access UDT tag metadata?](http://forum.inductiveautomation.com/t/template-using-udt-param-can-you-access-udt-tag-metadata/10179/3):
>
> Having more experience in using Ignition now, it’s worth noting that using UDT parameters within template symbols is not recommended. It’s much more efficient and scalable to bind the path to the UDT instance instead, and then concatenate the relative path to the tag onto that. Using a UDT parameter has two major down sides: all tags within the UDT are subscribed to, meaning higher load and potentially slower client and server performance, especially if a number of the template instances are …
