# Template Repeater update Dataset with a 'save' button

**URL:** <https://forum.inductiveautomation.com/t/template-repeater-update-dataset-with-a-save-button/68427>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [January 10, 2023, 2:22pm UTC](https://forum.inductiveautomation.com/t/template-repeater-update-dataset-with-a-save-button/68427 "2023-01-10T14:22:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keyur\_Parikh](https://avatars.discourse-cdn.com/v4/letter/k/c2a13f/32.png) [@Keyur\_Parikh](https://forum.inductiveautomation.com/u/Keyur_Parikh)\
**Post date:** [January 10, 2023, 2:22pm UTC](https://forum.inductiveautomation.com/t/template-repeater-update-dataset-with-a-save-button/68427/1 "2023-01-10T14:22:49Z")

</div>

On a vision Window:

I have a template repeater with multiple text fields from Template Parameters (SQL Query). I have a save button on the page and I would like to edit and save entries to the SQl DB.

I tried to do a property change script on the template (on L-Level) but this changed both rows of dataset (ie changed both deliveries).

Any tips. (FYI.. I am anew guy with scripting.)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/2/b2ac2a455bed06286c13ac853ba50857c771a237.png)

---

<div class="post-metadata">

**Author:** ![Munkhbat\_Munkhtulga](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Munkhbat\_Munkhtulga](https://forum.inductiveautomation.com/u/Munkhbat_Munkhtulga)\
**Post date:** [January 17, 2023, 9:30pm UTC](https://forum.inductiveautomation.com/t/template-repeater-update-dataset-with-a-save-button/68427/2 "2023-01-17T21:30:07Z")

</div>

Hi Keyur,

You can run queries by adding a script on a button and supply the values you need it from the property refence button. You can call a function like [system.db.runNamedQuery](https://docs.inductiveautomation.com/display/DOC81/system.db.runNamedQuery) or [system.db.runPrepQuery](https://docs.inductiveautomation.com/display/DOC81/system.db.runPrepQuery) to add the data to the database. I have a picture below for your reference for selecting values from your Window.

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

Best!
