getAllDataRecords

ArrayList dataSet.getAllDataRecords ( )

Description

Get all DataRecords in the DataSet.

Parameters

This method does not receive any parameters.

Return Values

Returns an ArrayList of DataRecord objects.

Change Log

Version Description
4.5 Available for all editions.

This method is provided as a convenience, the recommended way to iterate over data records in a data set is to use getNumDataRecords and getDataRecord.

Examples

Loop Through DataRecords

 // Stores all of the data records in the variable allData.
 allData = dataSet.getAllDataRecords();

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

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

See Also