Previous Next

Refreshes the current data set. All other data sets of the data source become invalidated, and will be requeried when viewed again.

Any inserted (but not committed) records will be moved to the current data set. Any gaps left by deleted (but not committed) records will be filled up.

Returns a Promise object or the 'this' object.


.refresh( options )


options    ::=  {

      current:  current

,     condition: condition

,     promise:  promise

,     success:  success-function

,     error:  error-function



current    ::= { true | false }

promise    ::= { true | false }

Options is a struct that can have the following items, all of which are optional.

Condition is a search condition that identifies the subset of rows that you want to be refreshed. See Example 2. The result of this "refresh" action is that the client will have the same records and the same values in these records as the server. This is NOT the same as refreshing a subset of rows already present on the client; use the .refresh() function of the Rows object for that.

If current is set to 'true', only the currently shown data set is refreshed. If it is set to 'false' (the default), the entire data source is refreshed.

Promise determines the return value of this function. If promise has the value of 'true' (the default), a Promise object is returned. If promise has the value of 'false', the ‘this’ object is returned instead.

Success-function is a function called after the data was processed on the client.

Error-function is a function called if an error occurs.


Example 1



Example 2

$.udb('EMP').refresh( condition: { BIRTHDAY: ">=01-JAN-1980" } );


Example 3

$.udb('EMP').refresh().then(function() {