getNumDataRecords
int dataSet.getNumDataRecords ( )
Description
Get the number of DataRecords in the DataSet.
Parameters
This method does not receive any parameters.
Return Values
Returns the number of DataRecords in the DataSet, as an integer.
Change Log
Version |
Description |
4.5 |
Available for all editions. |
Examples
Get the Number of DataRecords in the DataSet
// 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
- size() [dataSet] - Return the number of dataRecords in the dataSet.