JavaScript

{dialog.object}._listRefreshRecordsByKey Method

Syntax

{dialog.object}._listRefreshRecordsByKey(listId, keys [, options]);

Arguments

listIdstring

The name of the List control.

keysstring|array|

The primary key values of the records.

optionsJSON Object

Ability to add keys not displayed in control.

Description

Refreshes the data in the List for the specified records.

The records to refresh are specified by their primary key values. You can refresh one or more records. In the case where the List is based on a SQL datasource, the list must be configured to return the Primary Key of the table. If the list of keys to refresh contains keys that are not currently displayed in the List control, these records can be optionally appended to the List

 Example

Refreshes the record that has a primary key of 'ALFKI'.

{dialog.object}._listRefreshRecordsByKey('MYLIST1','ALFKI');

If you want to refresh more than one record, enter an array of key values.

{dialog.object}._listRefreshRecordsByKey('MYLIST1',['ALFKI','BOLID']);

In the case where the primary key is based on more than one column, the key segments are separated by '|||'.

{dialog.object}._listRefreshRecordsByKey('MYLIST1',['John|||Smith','Terry|||Jones']);

If any of the keys is not currently in the List you can append records to the list

var options = {addRowIfNotFound: true};
{dialog.object}._listRefreshRecordsByKey('MYLIST1',['John|||Smith','Terry|||Jones'], options);

In the case of .dbf tables, the 'keys' are the record number of the records you want to refresh.

{dialog.object}._listFetchRecordsByKey('MYLIST1',['23','57']);

See Also