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?

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

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.

Just in case, if the custom props is located in the same view the Button is, then use:

self.view.refreshBinding("custom.Parameter")

In my case, I was getting the error "No Scope defined". "view" was the scope in my case.