Skip to main content
Version: 10.1

Rowset.indexOf()

note

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

Rowset.indexOf()

Gets the index position of a specified target row set if this target row set exists in the collection of row sets contained in the Rowset object. Use this function also to find out if a specified row set exists.

Returns an integer. The index is 0-based: the first item has index 0, not 1.

Syntax

*row-set*.indexOf( *target-row-set*, *data-source* )

The required target-row-set may be specified using a string or an object.

tip

For details on how to reference a row set, go to UDB Rowset object.

If the collection contains row sets of multiple data sources, the optional data-source may be used to narrow down the search to one specific data source.

Example

if (rowSet.indexOf(rowSet.keysString()) === -1)
return false;