Purpose

.Refresh() allows you to re-display field data for certain objects.
 

Syntax

ObjectReference.Refresh()
 

Operation

ObjectReference is the Tag Name of the object.
 

Remarks

Refresh() updates the field data value for the specified field with the current value.

Note: You cannot use the Refresh() on the current field in the process point of On Refresh logic, as this causes the Virtual Machine to stop working. This also applies to nested calls. For example, if field A is the current field and its Refresh logic refreshes field B, and if field B's Refresh logic refreshes field A, then the Virtual Machine stops working. Refreshing other fields than the current field works successfully.

The following restrictions apply for Refresh()

  • The target field must be a valid active Dynamic object in the current cycle.

  • Refresh() is not valid when used in the logic points; Function In and Function Exit because the cycle is not active at those points.  

  • Refresh() is also not valid in Before Write logic because the fields have already been processed.  

  • The target field can be in the parent cycle if the field is not in a pop-up window.

Example

Executing Refresh() to update the combo box with the Tag Name of CUSTOMERNUMBER:

CUSTOMERNUMBER.Refresh()
 

Comment on this topic

Topic ID: 510025