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

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.

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.