Development tools : Global functions : List and Table category : getRowByIndex
  
getRowByIndex
Description
Returns an element in the given 'IColl' List according to the 'index'.
Usage
Client side: N
Server side: Y
Syntax
DataElement getRowByIndex(IndexedCollection iColl, Integer index)
Arguments
iColl
The table to be searched. The argument requires IndexedCollection type data.
index
The index of data element to be retrieved. The argument requires integer from 0 to size of iColl.
Return
Returns an element in the given 'IColl' List according to the 'index'. If iColl is null or index is more than iColl size, null will be returned.
Example
The example returns the element in the "accountList" indexed collection that corresponds to index 1. The accountList contains two elements: accountA in index 0 and accountB in index 1, as shown in the following iColl structure definition:
<iColl>accountList
<kColl>acountA
<field>accountId: '1001'
<field>accountAmount: 1000.25
<kColl>accountB
<field>accountId: '1002'
<field>accountAmount: 10000.45
getRowByIndex(accountList,1) returns data element with value:
<kColl>accountB
<field>accountId: '1002'
<field>accountAmount: 10000.45
Go up to
List and Table category