moveLast

Definition:

NDLDS<datasource name>.<dataset name>.moveLast()

 

Description:

Make the last record in the specified Dataset the current record and bind it to the Elements on the form.

If you select MoveLast 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.moveLast ()){

//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 MoveLast is the selected action and you then click the Convert to Custom JavaScript button within the Event Builder pop-up.

    If you are using moveLast 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 moveLast, 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.

  • moveLast 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:

getTable

refreshFormControlsFromDatasource

moveFirst

moveNext

movePrevious

Writing Scripts