# What does polling mode off actually mean

**URL:** <https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069>\
**Category:** Ignition\
**Tags:** namedqueries, ignition80, vision, ignition81\
**Created:** [April 5, 2022, 8:09pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069 "2022-04-05T20:09:46Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [April 5, 2022, 8:09pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069/1 "2022-04-05T20:09:46Z")

</div>

I am pretty sure I am failing to understand how polling mode works when “off”. My interpretation was if my data from the result changes then the query executes but I think it is actually only firing when my parameters update. So I added a custom parameter “refresh” that doesn’t change the query results but does get sent to the named query. Still no change in behavior.

What am I not understanding correctly?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/8/c8ffe0a07cde224ffc4f5c60f55591dfd31adce4.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 5, 2022, 8:18pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069/2 "2022-04-05T20:18:42Z")

</div>

Are you actually _changing_ the value of refresh? Setting `true` to `true` will probably be ignored, for instance.

Regardless, you should probably be doing a `refreshBinding()` instead: [Perspective Component Methods - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Perspective+Component+Methods#PerspectiveComponentMethods-RefreshingBindings)

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [April 5, 2022, 8:18pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069/3 "2022-04-05T20:18:57Z")

</div>

> [@bmeyers](#):
>
> My interpretation was if my data from the result changes then the query executes

How could the result data change without a query execution?

Polling mode set to `off` means the query will not update unless one of the parameters change. If you want to force trigger a refresh, the correct way to do that in a script is

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

```

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [April 5, 2022, 8:20pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069/4 "2022-04-05T20:20:05Z")

</div>

> [@paul-griffith](#):
>
> Regardless, you should probably be doing a `refreshBinding()` instead: [Perspective Component Methods - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Perspective+Component+Methods#PerspectiveComponentMethods-RefreshingBindings)

The question is for vision I think.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 5, 2022, 8:20pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069/5 "2022-04-05T20:20:54Z")

</div>

Ah, yeah, so it is, I misinterpreted the dialog.

Still: [system.db.refresh - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.db.refresh)

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [April 5, 2022, 8:21pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069/6 "2022-04-05T20:21:03Z")

</div>

I was flipping true to false and false to true. The data still wasn’t updating so I am trying to locate my problem.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [April 5, 2022, 8:22pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069/7 "2022-04-05T20:22:01Z")

</div>

What changes are you expecting to see? Are you sure it isn’t running the query and the result set is the same?

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [April 5, 2022, 8:26pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069/8 "2022-04-05T20:26:57Z")

</div>

I thought I would get new data but I may need to toggle something else to force the new data to appear.

The system.db.refresh() seems like the way to go though so I am not adding useless parameter to all my queries.

I will test further and report back.

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [April 5, 2022, 8:57pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069/9 "2022-04-05T20:57:35Z")

</div>

After some testing it doesn’t seem like system.db.refresh is working… but I know why.

In my setup I am not actually running the named query from the powertable. I have attached the powertable to a dataset tags custom property that is running the named query. So refreshing the table doesn’t accomplish anything (doesn’t appear to be).

---

<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 5, 2022, 9:14pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069/10 "2022-04-05T21:14:00Z")

</div>

Use `system.db.refresh` on the component & property that actually has the binding you wish to re-execute. (The custom property in this case.)

I hope you caught @dkhayes117 comment about not seeing anything changing in a DB without executing a query. While some DB brands may have event notifications available in their connection technology, JDBC doesn’t have a universal way to expose such.

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [April 6, 2022, 6:19pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069/11 "2022-04-06T18:19:28Z")

</div>

Ok, what is the syntax to update a property on a root container?

This code isn’t cutting it…

```auto
system.db.refresh(event.source.parent, "data")
```

In this case my button the script is being called from is directly under the ‘Root Container’.

---

<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 6, 2022, 6:20pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069/12 "2022-04-06T18:20:46Z")

</div>

Is the name of the root container custom property “data” ?

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [April 6, 2022, 6:30pm UTC](https://forum.inductiveautomation.com/t/what-does-polling-mode-off-actually-mean/58069/13 "2022-04-06T18:30:17Z")

</div>

It sure isn’t!

😓 🤦‍♂️
