Skip to main content
Version: 8.1

system.db.refresh

This function is used in Python Scripting.

Description​

This function will cause a Vision component binding to execute immediately. This is most often used for bindings that are set to Polling - Off. In this way, you cause a binding to execute on demand, when you know that the results of its query will return a new result. To use it, you simply specify the component and name of the property on whose binding you'd like to refresh.

Even though the function includes "db" in the name, the function can update all types of Vision component bindings, including Property and Expression bindings.

note

Note: This function will only work within the Vision module. To manually execute bindings in Perspective, use the refreshBinding component method.

Client Permission Restrictions​

Permission Type: Legacy Database Access

Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope.

Syntax​

system.db.refresh(component, propertyName)

Parameters​

TypeParameterDescription
JComponentcomponentThe component whose property you want to refresh.
StringpropertyNameThe name of the property that has a SQL Query binding that needs to be refreshed.

Returns​

Boolean - True if the property was found and refreshed successfully.

Scope​

Vision Client

Code Examples​

Code Snippet - Refreshing a Table's Data Property
# This example could be placed in the actionPerformed event of a Button, to be used to refresh the data of a Table. 
# Remember to use the scripting name of the property that you're trying to refresh, and that the property names are case-sensitive.

table = event.source.parent.getComponent("Table")
system.db.refresh(table, "data")

Keywords​

system db refresh, db.refresh