Refresh binding on custom Session Props

Is it possible to refresh a binding on a custom session prop?

I’ve tried using .refreshBinding via a button but it didn’t work. Wondering now if it’s even possible

i’ve tried:
self.session.custom.refreshBinding('Parameter') and
self.refreshBinding('session.custom.Parameter') and
self.refreshBinding('self.session.custom.Parameter')

Which resulted in different errors:

  1. ‘com.inductiveautomation.perspective.gateway.script’ object has no attribute ‘refreshBinding’
  2. Invalid property key - no scope defined: session.custom.Parameter
  3. Invalid property key - no scope defined: self.session.custom.Parameter

Has anyone successfully done this?

1 Like

self.session.refreshBinding("custom.Parameter") perhaps?

9 Likes

Doh! That was too easy :sweat_smile:

Thank you

How do I increase the rate for self-refreshing?

That's not a question that makes sense.

If it's a polling binding, you can change the poll rate at the binding level.
refreshBinding is for a demand poll. If you want it to happen more often...call refreshBinding more often.

2 Likes