# Can I Update a Table with a button push

**URL:** <https://forum.inductiveautomation.com/t/can-i-update-a-table-with-a-button-push/11549>\
**Category:** Ignition\
**Created:** [April 20, 2016, 8:36pm UTC](https://forum.inductiveautomation.com/t/can-i-update-a-table-with-a-button-push/11549 "2016-04-20T20:36:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbackus](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tbackus/32/5091_2.png) [@tbackus](https://forum.inductiveautomation.com/u/tbackus)\
**Post date:** [April 20, 2016, 8:36pm UTC](https://forum.inductiveautomation.com/t/can-i-update-a-table-with-a-button-push/11549/1 "2016-04-20T20:36:39Z")

</div>

The table is the result of a SQL query. And rather than run the query on some sort of timed basis, can I simply tie a button to it to “Refresh” or re-run the query?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [April 20, 2016, 9:10pm UTC](https://forum.inductiveautomation.com/t/can-i-update-a-table-with-a-button-push/11549/2 "2016-04-20T21:10:31Z")

</div>

Just set the query to relative or absolute poll

[https://docs.inductiveautomation.com/display/DOC/SQL+Query+Binding±+Polling](https://docs.inductiveautomation.com/display/DOC/SQL+Query+Binding+-+Polling)

[attachment=0]dbignition.PNG[/attachment]

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 20, 2016, 9:12pm UTC](https://forum.inductiveautomation.com/t/can-i-update-a-table-with-a-button-push/11549/3 "2016-04-20T21:12:07Z")

</div>

Yes. [system.db.refresh()](https://docs.inductiveautomation.com/display/DOC/system.db.refresh)  
Although it is documented to refresh non-polling SQL queries, it actually will refresh pretty much any binding to property.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [April 20, 2016, 9:12pm UTC](https://forum.inductiveautomation.com/t/can-i-update-a-table-with-a-button-push/11549/4 "2016-04-20T21:12:15Z")

</div>

Or if you want to manually refresh the table run the following code  
Where Power Table 1 is the name of your table.

```auto
system.db.refresh(event.source.parent.getComponent('Power Table 1'),"data")
```
