# Updating template repeater dataset from repeated template

**URL:** <https://forum.inductiveautomation.com/t/updating-template-repeater-dataset-from-repeated-template/20340>\
**Category:** Ignition\
**Created:** [October 24, 2018, 4:42am UTC](https://forum.inductiveautomation.com/t/updating-template-repeater-dataset-from-repeated-template/20340 "2018-10-24T04:42:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 24, 2018, 4:42am UTC](https://forum.inductiveautomation.com/t/updating-template-repeater-dataset-from-repeated-template/20340/1 "2018-10-24T04:42:30Z")

</div>

Hi,

I have a template repeater that shows a recipe’s steps as per screenshot below. When in edit mode, the operator is able to delete a step using the X on the right. The X manipulates the SQL table by effectively removing the step at that index and then re-indexing the remaining steps so that they’re sequential again.  
The template repeater SQL binding set to not polled, as I don’t want it updating all the time.

The issue I have is that when I delete a row, it doesn’t update to reflect the changes.

How can I perform a refresh (system.db.refresh) on the templateParams dataset after clicking the X?  
I _don’t_ want to hard code this by using something like system.gui.getParentWindow(event).rootContainer.getComponent(“group”).getComponent(“Template Repeater”)… etc.

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

Thanks in advance.

Nick

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [October 24, 2018, 9:51am UTC](https://forum.inductiveautomation.com/t/updating-template-repeater-dataset-from-repeated-template/20340/2 "2018-10-24T09:51:34Z")

</div>

Hi Nick,

Even if you do a system.db.refresh on the correct templates, it will not update other clients.

What I usually do is create a memory tag to act as a trigger (a boolean is best, as it simplifies the caching that often happens on various layers). I use that memory tag somewhere in the query `WHERE` clause, and when it’s clicked, I `not` that tag, so the query parameters change, and the query is evaluated again.

```auto
SELECT myData
FROM myTable
WHERE {triggerTag} = {triggerTag}

```

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 24, 2018, 9:50pm UTC](https://forum.inductiveautomation.com/t/updating-template-repeater-dataset-from-repeated-template/20340/3 "2018-10-24T21:50:38Z")

</div>

Thanks Sander, that’s a really good idea! I will start doing this from now on with all my tables. Cheers for the reply
