# \[project\] Template Repeater Example

**URL:** <https://forum.inductiveautomation.com/t/project-template-repeater-example/16139>\
**Category:** Ignition\
**Created:** [November 27, 2017, 9:51pm UTC](https://forum.inductiveautomation.com/t/project-template-repeater-example/16139 "2017-11-27T21:51:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmisztur2](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmisztur2/32/4243_2.png) [@cmisztur2](https://forum.inductiveautomation.com/u/cmisztur2)\
**Post date:** [November 27, 2017, 9:51pm UTC](https://forum.inductiveautomation.com/t/project-template-repeater-example/16139/1 "2017-11-27T21:51:29Z")

</div>

The example project aims to address some issues I have encountered when working with the repeater:

- manually setting templateParams,
- refreshing loaded templates when the templateParams data changes but the dataset’s count does not,
- accessing loaded templates at the correct time with getLoadedTemplates().

[TemplateRepeaterExample\_2017-11-28\_0833\_partial.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/54ccce22a796fe1317185195a5387e8b91497a1e.proj) (19.4 KB)

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/ca974addf194d49990412074366a8db4997393b8.png)

/chris

---

<div class="post-metadata">

**Author:** ![joostjojo](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@joostjojo](https://forum.inductiveautomation.com/u/joostjojo)\
**Post date:** [July 31, 2018, 6:51am UTC](https://forum.inductiveautomation.com/t/project-template-repeater-example/16139/2 "2018-07-31T06:51:24Z")

</div>

> [@cmisztur2](#):
>
> manually setting templateParams,

I have problems with manually setting templateParams as well.

this is what i do in my script on my template:

window = system.gui.getWindow('Popups/Add')  
dtset = window.getRootContainer().getComponent("Template Repeater").templateParams  
pyData = system.dataset.toPyDataSet(dtset)

---\> here i do some things with my pyData

window.getRootContainer().getComponent("Template Repeater").templateParams = newdtset

i have this in a try except, but this row gives me an error:  
window.getRootContainer().getComponent("Template Repeater").templateParams = newdtset

by the way: its working how it should be, except i get error messages everytime i a field on the template repeater when this row is called

---

<div class="post-metadata">

**Author:** ![joostjojo](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@joostjojo](https://forum.inductiveautomation.com/u/joostjojo)\
**Post date:** [July 31, 2018, 7:33am UTC](https://forum.inductiveautomation.com/t/project-template-repeater-example/16139/3 "2018-07-31T07:33:34Z")

</div>

it is working now, i made an extra custom propertie on my rootcontainer. i bind the sql query to that propery and set the template repeater binding to that propertie instead of the sql binding. a little bit weird but at least it works
