I have the data field for a vision Table object bound to a SQL/Named Query. I want to re-run said query upon clicking a button. Is there a way to do this that doesn't involve running the query in the button and then setting the .data field? I am hoping for something akin to myTable.refresh()
Yes, use system.db.refresh()
. You supply the component reference and the property name, it re-executes that property's binding.
3 Likes
Perfect! Thanks phil, that's exactly it.
FYI -- this is not synchronous. I've spent the last half hour chasing a bug that turns out to be that this update is slower than the execution of the next line in the script. I suppose since its a system call I could have guessed that, but I didnt.
That's correct. Query and tag bindings are entirely asynchronous. Anything that depends upon data arrival should be in a propertyChange event, or in a chained binding. (So too in Perspective.)
1 Like