# Template repeater with UDT templates

**URL:** <https://forum.inductiveautomation.com/t/template-repeater-with-udt-templates/17016>\
**Category:** Ignition\
**Created:** [February 16, 2018, 12:23pm UTC](https://forum.inductiveautomation.com/t/template-repeater-with-udt-templates/17016 "2018-02-16T12:23:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pat.stave1](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@pat.stave1](https://forum.inductiveautomation.com/u/pat.stave1)\
**Post date:** [February 16, 2018, 12:23pm UTC](https://forum.inductiveautomation.com/t/template-repeater-with-udt-templates/17016/1 "2018-02-16T12:23:34Z")

</div>

I have a template with a template parameter of custom UDT type.  
Now, i want to use the template repeater to create 4 instances of this template.

I use dataset mode on the repeater component. I want to reference 4 separate UDT instances as parameters.

The name of the template parameter is TankUDT.  
I now create a template parameter dataset on the repeater component with a column named TankUDT of type string.  
At each line i punch in the tagpath of the UDT instance.

This does not work. How can i reference a UDT instance in a dataset?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 16, 2018, 12:49pm UTC](https://forum.inductiveautomation.com/t/template-repeater-with-udt-templates/17016/2 "2018-02-16T12:49:40Z")

</div>

> [@pat.stave1](#):
>
> How can i reference a UDT instance in a dataset?

You can't. You need a parameter in your template that receives your tag path as a string. Within the template, use an indirect tag binding to retrieve the correct UDT based on that string.

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [February 16, 2018, 5:35pm UTC](https://forum.inductiveautomation.com/t/template-repeater-with-udt-templates/17016/3 "2018-02-16T17:35:57Z")

</div>

I ran into this before where I had a template with a UDT parameter, but also wanted to render it in a repeater. To make that possible, I just made a wrapper template with a string parameter for a tag path. Inside the wrapper template, I mapped the UDT at the path to the original templates parameter. In your repeater you just use the wrapper instead and pass the tag paths.

---

<div class="post-metadata">

**Author:** ![rpavlicek](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rpavlicek/32/55868_2.png) [@rpavlicek](https://forum.inductiveautomation.com/u/rpavlicek)\
**Post date:** [July 24, 2020, 3:04pm UTC](https://forum.inductiveautomation.com/t/template-repeater-with-udt-templates/17016/4 "2020-07-24T15:04:17Z")

</div>

This is exactly what I need to do for my project, but am having a hard time following the two suggestions above. I’m very familiar with the many concepts in Vision, but just got into template repeaters recently.

In my template, do I need an internal property or template parameter for the path string? I would assume an internal property, because that’s the only way I can bind or “map” something, since you can’t bind a template parameter either on the template or in a repeater directly, no? Lastly, what are you binding, can an example be shown?
