Skip to main content
Version: 10.1

Rowset.dataSet()

note

This article is about the dataSet() function of the Rowset object.

Rowset.dataSet()

Gets information about a specific data set in a row set. The subdivision into data sets of a row set depends on the value of the data source's "Maximum number of records" property. You can get this value by calling .dataSetIndicator().

Returns an object with static information about this data set. The data set must have been queried already and must exist prior to calling this function, or else the result value is 'undefined'. Whether or not a data set is queried depends on the value of the data source's "Automatically query next data sets" property.

Syntax

*row-set*.dataSet( *data-set* )

*data-set* ::= { current | first | last | *index* }

The required data-set is one of the following:

  • One of the literal values listed and explained in the table below, or
  • An index value that is an integer pointing at a specific data set. The index is 0-based: the first data set has index 0, not 1.
ValueMeaning
currentThe data set that is currently selected
firstThe first data set in the row set
lastThe last data set in the row set

Output values

The returned object contains the following fields:

ValueMeaning
indexThe data set index value of this data set. The index is 0-based: the first item has index 0, not 1.
startThe index value, relative to the row set, of the first record in the data set.
endThe index value, relative to the row set, of the last record in the data set.
isFirstA boolean stating whether this is the first data set relative to the row set.
isLastA boolean stating whether this is the last data set relative to the row set.
isEmptyA boolean stating whether this data set is empty (= contains no records).
rowCountAn integer indicating the total number of records contained by the row set (including inserted/deleted records).
rowsQueriedAn integer indicating the number of records in this data set that have been queried from the server.

Example

var dataSetInfo = rowSet.dataSet('current');
if (dataSetInfo.rowCount > 10) {
var rows = rowSet.rows(dataSetInfo.start, dataSetInfo.start+10);

}