moveNext
Definition:
NDLDS<datasource name>.<dataset name>.moveNext()
Description:
Move to the next record after the current record in the specified Dataset, make it the current record and bind it to the Elements on the form.
If you select MoveNext as a predefined action in an Element's Event Property, all Elements on the form which have input mappings to the specified Dataset will also be updated with values in the new current record (see Code Sample and Notes).
Parameters:
none
Note: This function does not use the default ndlParams object.
Returns:
nothing
Code Sample:
if(NDLDSMyDatasource.myDatasets.moveNext()){
//update the elements with the values of the current record
NDLRuntime.refreshFormControlsFromDatasource( "MyDatasource", "MyDataset";
}
Notes:
-
The code sample above shows the JavaScript statements which will appear in the custom JavaScript function generated by an Element's Event property when MoveNext is the selected action and you then click the Convert to Custom JavaScript button within the Event Builder pop-up.
If you are using moveNext in your own custom JavaScript functions, you can update the values displayed in the Elements on the form by calling NDLRuntime.refeshFormControlsFromDatasource as shown in the code sample above.
-
When calling moveNext, you can find the names you need to use in your custom JavaScript to refer to a Datasource and its Dataset from the Datasource and Datasets's Code Name properties.
-
moveNext is also available from a Dataset's table object, which can be obtained by calling getTable.
Using as Predefined Action in Event:
When assigned to an Event as a predefined action, this function doesn’t require any editing.
See also:
refreshFormControlsFromDatasource