# Use Template Repeater

**URL:** <https://forum.inductiveautomation.com/t/use-template-repeater/87271>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [March 13, 2024, 2:08pm UTC](https://forum.inductiveautomation.com/t/use-template-repeater/87271 "2024-03-13T14:08:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastien\_ng](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sebastien_ng/32/55297_2.png) [@sebastien\_ng](https://forum.inductiveautomation.com/u/sebastien_ng)\
**Post date:** [March 13, 2024, 2:08pm UTC](https://forum.inductiveautomation.com/t/use-template-repeater/87271/1 "2024-03-13T14:08:42Z")

</div>

**Template**  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/4/34bf577ead1291bb0aacf5c2e64cba4b3d915990.png)  
Param of template :  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/ac13ba53ba651e849d2630c96451e038d50f41a5.png)

**Main Window** :

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/1/11237055c7ca3f693d242b2fa2bbea01b673d3f9.png)

What I want to do is when I change Value of temperature of dropdown list, value of Thermometer muste change.

For exemple on Main Window, if I choose `Temperature = 50` value of all `Thermometer must be 50`

---

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [March 13, 2024, 2:15pm UTC](https://forum.inductiveautomation.com/t/use-template-repeater/87271/2 "2024-03-13T14:15:16Z")

</div>

You'll need to change the "Repeat Behavior" from `Count` to `Dataset` so you can externally control more than one parameter:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/f/cf21f3726d48c267afbdbd744fb428535c02d724.png)

That will let you set up a binding on "Template Parameters" to pass in a dataset where the column names would be `Attente`, `nom`, and `num_motor`, and the rows would be the values for each template you want.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/c/3c7240db2d9354863b4fb1f4781736a589512e4c.png)

Edit: If there's any parameters you don't want to have to control externally you can leave that column out of the dataset.

---

<div class="post-metadata">

**Author:** ![sebastien\_ng](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sebastien_ng/32/55297_2.png) [@sebastien\_ng](https://forum.inductiveautomation.com/u/sebastien_ng)\
**Post date:** [March 13, 2024, 2:23pm UTC](https://forum.inductiveautomation.com/t/use-template-repeater/87271/3 "2024-03-13T14:23:35Z")

</div>

> [@Felipe\_CRM](#):
>
> "Repeat Behavior" from `Count` to `Dataset`

Thank you @Felipe_CRM but if I change "Repeat Behavior" to `Dataset` Template Repeater will be dynamic ?

---

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [March 13, 2024, 2:35pm UTC](https://forum.inductiveautomation.com/t/use-template-repeater/87271/4 "2024-03-13T14:35:05Z")

</div>

If your dataset binding is dynamic then the Template Repeater will be dynamic as well. For that you'll most likely have to use a `runscript()` expression (or pturmel's Integration Toolkit) to build your dataset dynamically, or if you have a fixed number of rows you can just use a Cell Update Binding.

---

<div class="post-metadata">

**Author:** ![sebastien\_ng](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sebastien_ng/32/55297_2.png) [@sebastien\_ng](https://forum.inductiveautomation.com/u/sebastien_ng)\
**Post date:** [March 13, 2024, 2:53pm UTC](https://forum.inductiveautomation.com/t/use-template-repeater/87271/5 "2024-03-13T14:53:45Z")

</div>

> [@Felipe\_CRM](#):
>
> runscript()

What are you saying is I need create a `script` and a will execute it on expression to get `dataset` ?  
If yes what I will change to modify value of `Thermometers` on Template Repeater when I change value of `Dropdown` ?

---

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [March 13, 2024, 2:55pm UTC](https://forum.inductiveautomation.com/t/use-template-repeater/87271/6 "2024-03-13T14:55:40Z")

</div>

You'd pass the value of `Dropdown` to your `runscript()` as an argument. That way, whenever it changes it would automatically re-evaluate the expression and generate a new dataset.

---

<div class="post-metadata">

**Author:** ![leonardo.godoi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/leonardo.godoi/32/27178_2.png) [@leonardo.godoi](https://forum.inductiveautomation.com/u/leonardo.godoi)\
**Post date:** [March 13, 2024, 3:32pm UTC](https://forum.inductiveautomation.com/t/use-template-repeater/87271/7 "2024-03-13T15:32:24Z")

</div>

For this to work you'll need the correct parameters set up on your template. If i'm not mistaken, each column on your dataset will correspond to a different parameter and each row will correspond to each Template instance. I would try to mess with the Template Parameters dataset first, create the columns you'll need and change the values manually to see if they change and everything is set up correctly, then i would worry about how to change the parameters dynamically.  
To change the parameters dynamically in this case i would use an onPropertyChange script on the dropdown that will monitor for changes in the selected option and then change the values on the same script.
