SimpleDataset firstRecord()
syntax: |
simpledataset.firstRecord() |
return: |
object - the first record in the SimpleDataset. If the SimpleDataset is empty, null is returned.
|
description: |
This method moves the current record to the first 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 lastRecord()
|
example: |
// get the first record var rec = ds.firstRecord();
// so long as the record isn't null, print out all // of the fields of the object if( null != rec ) for( var prop in rec ) Clib.printf(prop + " = " + rec[prop] + "\n"); |