# Template repeater with Dataset behaviour to update SQL table

**URL:** <https://forum.inductiveautomation.com/t/template-repeater-with-dataset-behaviour-to-update-sql-table/17336>\
**Category:** Ignition\
**Created:** [March 13, 2018, 10:18am UTC](https://forum.inductiveautomation.com/t/template-repeater-with-dataset-behaviour-to-update-sql-table/17336 "2018-03-13T10:18:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanko25](https://avatars.discourse-cdn.com/v4/letter/v/a87d85/32.png) [@vanko25](https://forum.inductiveautomation.com/u/vanko25)\
**Post date:** [March 13, 2018, 10:18am UTC](https://forum.inductiveautomation.com/t/template-repeater-with-dataset-behaviour-to-update-sql-table/17336/1 "2018-03-13T10:18:08Z")

</div>

Hi all,

I am currently experimenting with the Template repeater. I have set my template and the template behaviour to Dataset which pulls data from a table in my SQL server. It displays the templates ok but when I try to edit the text fields it will not update the DB. In the binding property I cannot find an option to enable UPDATE query on value change.

This is the dataset pulled from my DB:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9461635984825f5021b0b8c79319b9675c3a59fa.png)

The query is the simple SELECT \* FROM myTable. That is generated by the DB Browse.

So the question again is it possible to write back from the text fields in the template? Thanks!

---

<div class="post-metadata">

**Author:** ![zacslade](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacslade/32/3587_2.png) [@zacslade](https://forum.inductiveautomation.com/u/zacslade)\
**Post date:** [March 13, 2018, 12:13pm UTC](https://forum.inductiveautomation.com/t/template-repeater-with-dataset-behaviour-to-update-sql-table/17336/2 "2018-03-13T12:13:58Z")

</div>

Hi Vanko25,

The simplest way that comes to my mind would be to run a property change script on the text fields that fires an update query back to the database.(using system.db.runUpdateQuery).

Regards

---

<div class="post-metadata">

**Author:** ![vanko25](https://avatars.discourse-cdn.com/v4/letter/v/a87d85/32.png) [@vanko25](https://forum.inductiveautomation.com/u/vanko25)\
**Post date:** [March 16, 2018, 11:35am UTC](https://forum.inductiveautomation.com/t/template-repeater-with-dataset-behaviour-to-update-sql-table/17336/3 "2018-03-16T11:35:12Z")

</div>

Hi Zac,

That worked very well. Thanks!
