# Disable request data query in power table

**URL:** <https://forum.inductiveautomation.com/t/disable-request-data-query-in-power-table/34248>\
**Category:** Ignition\
**Created:** [April 27, 2020, 7:28pm UTC](https://forum.inductiveautomation.com/t/disable-request-data-query-in-power-table/34248 "2020-04-27T19:28:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![SergioS](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@SergioS](https://forum.inductiveautomation.com/u/SergioS)\
**Post date:** [April 27, 2020, 7:28pm UTC](https://forum.inductiveautomation.com/t/disable-request-data-query-in-power-table/34248/1 "2020-04-27T19:28:39Z")

</div>

Good morning at all,  
I have aquestion about possibility to disable request data to DB from power table.

I try to explein better:  
In my page I have 2 powertable that read data from different tables.  
With a button i go to enable/disable visibility (or enable property) of them, but I have see that in every case they go to read data to database.  
For reduce traffic I want to use visibility as key for enable the polling.

Somebody have an idea if this is possible?

Thanks

---

<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 27, 2020, 9:00pm UTC](https://forum.inductiveautomation.com/t/disable-request-data-query-in-power-table/34248/2 "2020-04-27T21:00:01Z")

</div>

Turn polling off in the table’s data binding. Use a timer component set to your desired poll rate, and bind its enable property to the visibility of the table. In the timer’s actionPerformed event, use `system.db.refresh` to tell the table’s query binding to run.

---

<div class="post-metadata">

**Author:** ![SergioS](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@SergioS](https://forum.inductiveautomation.com/u/SergioS)\
**Post date:** [May 10, 2020, 2:30pm UTC](https://forum.inductiveautomation.com/t/disable-request-data-query-in-power-table/34248/3 "2020-05-10T14:30:06Z")

</div>

I have try to do this, but data don’t refresh.

I have try to do this putting on a button script:

from java.lang import Exception as JException

try:

```
event.source.parent.getComponent('Range').getComponent('ptProdRange').data = None
system.db.refresh(event.source.parent.getComponent('Range').getComponent('ptProdRange'), "data")

```

except JException, e:  
print e.cause

in data i see data go down and come back with old data.

Binding is a SQL Query

---

<div class="post-metadata">

**Author:** ![SergioS](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@SergioS](https://forum.inductiveautomation.com/u/SergioS)\
**Post date:** [May 10, 2020, 2:57pm UTC](https://forum.inductiveautomation.com/t/disable-request-data-query-in-power-table/34248/4 "2020-05-10T14:57:17Z")

</div>

During my test on this problem I have detect this “strange” functionality…

My data binding is a SQL QUery with Where parameter depending of object in same window.

Databing is off, but if parameter change, binding is refreshed without nothing that do request…

---

<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:** [May 10, 2020, 10:55pm UTC](https://forum.inductiveautomation.com/t/disable-request-data-query-in-power-table/34248/5 "2020-05-10T22:55:23Z")

</div>

Yes, bindings refresh automatically if anything they depend on change. If you don’t want that to happen, you’ll need to do the entire query operation in a background script, not a binding, started only when you desire. Bindings set to “no poll” are also run at least once when the window opens. You haven’t set the _ **binding** _ to OFF, just the _ **poll** _.

---

<div class="post-metadata">

**Author:** ![SergioS](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@SergioS](https://forum.inductiveautomation.com/u/SergioS)\
**Post date:** [March 9, 2021, 11:48am UTC](https://forum.inductiveautomation.com/t/disable-request-data-query-in-power-table/34248/6 "2021-03-09T11:48:43Z")

</div>

When parameter for binding change and pool is OFF, at which rate data will be automatically refreshed?

Thanks

---

<div class="post-metadata">

**Author:** ![SergioS](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@SergioS](https://forum.inductiveautomation.com/u/SergioS)\
**Post date:** [March 9, 2021, 11:51am UTC](https://forum.inductiveautomation.com/t/disable-request-data-query-in-power-table/34248/7 "2021-03-09T11:51:11Z")

</div>

And another question , when I go to use this in script system.db.refresh(table,‘property’) how can be sure that refresh is completed?

Thanks

---

<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:** [March 9, 2021, 1:46pm UTC](https://forum.inductiveautomation.com/t/disable-request-data-query-in-power-table/34248/8 "2021-03-09T13:46:43Z")

</div>

> [@SergioS](#):
>
> at which rate data will be automatically refreshed?

No rate. It will be refreshed once per reference change. If two references change very close together in time, the refreshes they trigger may be coalesced into a single refresh.

---

<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:** [March 9, 2021, 1:47pm UTC](https://forum.inductiveautomation.com/t/disable-request-data-query-in-power-table/34248/9 "2021-03-09T13:47:47Z")

</div>

> [@SergioS](#):
>
> how can be sure that refresh is completed?

Use a propertyChange event checking the bound property name--that will fire when the completed data is delivered.

---

<div class="post-metadata">

**Author:** ![SergioS](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@SergioS](https://forum.inductiveautomation.com/u/SergioS)\
**Post date:** [March 9, 2021, 1:49pm UTC](https://forum.inductiveautomation.com/t/disable-request-data-query-in-power-table/34248/10 "2021-03-09T13:49:15Z")

</div>

If I test like this in script is not good?

if system.db.refresh(table,‘data’) :  
logger.info(“New data : refresh data DONE” )

---

<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:** [March 9, 2021, 1:50pm UTC](https://forum.inductiveautomation.com/t/disable-request-data-query-in-power-table/34248/11 "2021-03-09T13:50:03Z")

</div>

No. Refresh of asynchronous bindings is asynchronous.
