# Template Repeater Folders

**URL:** <https://forum.inductiveautomation.com/t/template-repeater-folders/10793>\
**Category:** Ignition\
**Created:** [November 16, 2015, 3:48pm UTC](https://forum.inductiveautomation.com/t/template-repeater-folders/10793 "2015-11-16T15:48:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikehill100](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@mikehill100](https://forum.inductiveautomation.com/u/mikehill100)\
**Post date:** [November 16, 2015, 3:48pm UTC](https://forum.inductiveautomation.com/t/template-repeater-folders/10793/1 "2015-11-16T15:48:34Z")

</div>

Hi everyone,

Got another question. I have two template repeaters set to the “count” repeat behavior. The templates inside are bound indirectly to tags. I would like to point each of the repeaters to a different folder, but can’t figure out how I would get the tag path from the template repeater to the bindings on the templates inside of it.

There may not be a solution, but does anyone have any ideas?

Thanks,

- Mike

---

<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:** [November 16, 2015, 7:54pm UTC](https://forum.inductiveautomation.com/t/template-repeater-folders/10793/2 "2015-11-16T19:54:50Z")

</div>

The canonical way to do this is to have a template parameter named ‘folder’, and a setting for that in your template repeater’s ‘Template Parameters’ dataset. If your scripts inside the template actually need to access the template repeater component, you could use something like this:[code]from javax.swing import SwingUtilities  
from com.inductiveautomation.factorypmi.application.components import TemplateCanvas, TemplateRepeater  
from com.inductiveautomation.factorypmi.application.components.template import TemplateHolder

def holder(comp):  
for x in (TemplateCanvas, TemplateRepeater, TemplateHolder):  
try:  
holder = SwingUtilities.getAncestorOfClass(x, comp)  
except:  
holder = None  
if holder:  
return holder  
return None[/code]Pass ‘event.source’ to this holder() function. Or if you need this in a bound expression, pass ‘binding.target’ within the [objectScript()](https://inductiveautomation.com/forum/viewtopic.php?f=50&t=14532) expression function.

---

<div class="post-metadata">

**Author:** ![mikehill100](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@mikehill100](https://forum.inductiveautomation.com/u/mikehill100)\
**Post date:** [November 24, 2015, 5:18pm UTC](https://forum.inductiveautomation.com/t/template-repeater-folders/10793/3 "2015-11-24T17:18:02Z")

</div>

Thanks. The issue is that I’d like to use the template repeater in “Count” repeat behavior as opposed to the “Dataset” repeat behavior, so I’m not sure how I can pass parameters to the template…

---

<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:** [November 24, 2015, 11:17pm UTC](https://forum.inductiveautomation.com/t/template-repeater-folders/10793/4 "2015-11-24T23:17:58Z")

</div>

Ah, then use the ‘index parameter name’ in the repeater. The template must have a template parameter of that name, as an integer. Use that parameter inside the template to construct your indirect tag path.
