Xbasic

OBJECT.REFRESH_FIELDS Function

Syntax

.Refresh_fields()

Description

Refreshes each field in the layout.

The <OBJECT>.REFRESH_FIELDS() method applies to:

Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)

The <OBJECT>.REFRESH_FIELDS() method executes the .REFRESH() method on each field object on a layout.

Example

dim p as P
dim t as P
p = form.view("Customer")
'get a pointer to the primary table in the form
t = p.Table_Get()
'start entering a new record, honoring field rules
t.enter_begin(honor_field_rules)
t.lastname = "Smith"
t.firstname = "Simon"
'at this point, the form does not yet show the new data
p.Refresh_fields()

Now the form shows the new data, but it is still in enter mode. Contrast this method with the <FORM>.RESYNCH() method which refreshes the form by re-displaying the data from the record in the record buffer. This method can only be executed if the form is in View mode.

Limitations

Desktop applications only.

See Also