संपादित करें

इसके माध्यम से साझा किया गया


INDEX ER function

The INDEX function returns a Container (record) value that is selected by using the specified numeric index in the specified list. If the index is out of range for the records in the specified list, an exception is thrown.

Syntax

INDEX (list, index)

Arguments

list: Record list

The valid path of a data source of the Record list data type.

index: Integer

A numeric index that indicates the position of the desired record in the specified list.

Note

Because one-based numbering is used for this function, specify the value 1 to return the first record of the specified list.

Return values

Container (record)

The resulting record value.

Example 1

If you enter data source DS of the Calculated field type, and it contains the expression SPLIT ("A|B|C", "|"), the expression DS.Value returns the text value "B" for the second record of this record list. The expression INDEX (SPLIT ("A|B|C", "|"), 2).Value also returns the text value "B".

Example 2

If you enter data source DS of the Calculated field type, and it contains the expression SPLIT ("A|B|C", "|"), the expression INDEX (SPLIT ("A|B|C", "|"), 4).Value throws an exception at runtime.

Additional resources

List functions