contents   index   previous   next



SimpleDataset lastRecord()

syntax:

simpledataset.lastRecord()

return:

object - the last record in the SimpleDataset. If the SimpleDataset is empty, null is returned.

 

description:

This method moves the current record to the last record in the SimpleDataset and returns the new current record. If the SimpleDataset is empty, null is returned.

 

see:

#include <smdtset.jsh>, SimpleDataset currentRecord(), SimpleDataset nextRecord(), SimpleDataset prevRecord(), SimpleDataset firstRecord()

 

example:

// get the last record

var rec = ds.lastRecord();

 

// so long as the record isn't null,

// print out all of the

// of the fields of the object

if( null != rec )

   for( var prop in rec )

      Clib.printf(prop + " = " + rec[prop] + "\n");

 


SimpleDataset find() with template