getDataRecord

DataRecord dataSet.getDataRecord ( int dataRecordNumber )

Description

Get one DataRecord in the DataSet.

Parameters

  • dataRecordNumber Index of the DataRecord in the DataSet, as an integer. Remember that the DataRecords set is zero based and so the first DataRecord would be at the index of zero.

Return Values

Returns a DataRecord (Hashtable object). If there is not a DataRecord at the specified index an error will be thrown.

Change Log

Version Description
4.5 Available for all editions.

Examples

Get DataRecords in a Loop

 // Loop through each of the data records.
 for( i = 0; i < dataSet.getNumDataRecords(); i++ )
 {
     // Store the current data record in the variable myDataRecord.
     myDataRecord = dataSet.getDataRecord( i );

     // Output the "PRODUCT_NAME" value from the data record to the log.
     session.log( "Product name: " + myDataRecord.get( "PRODUCT_NAME" ) );
 }

See Also