FINDARRELEMENT

Usage

TIBCO iProcess Workspace (Browser)

TIBCO iProcess Workspace (Windows)

Returns the index number of the next array element that matches the given value in the given array field after the given start element. See “Using Arrays Fields” in the TIBCO iProcess Modeler Advanced Design for more information about using array fields.

Syntax

FINDARRELEMENT (arrayname, startelement, value)

where:

arrayname (text) is the name of the array field on which to perform the search.
Note: This must be in quotation marks. For example, if the array field name is CUSTOMER, then it must be entered in the expression as “CUSTOMER”. For composite fields, only the composite field name should be entered (without any sub-field definition).
startelement (numeric) element index number to start the search from or -1 for the first assigned element.
value (text, numeric, date or time) is the value to find in the array elements.

Returns

One of the following numeric values:

Value

Description

-1

No more elements with the given value are found after start element

Anything Else

Numeric value for the index number of the array element

Examples

TIBCO iProcess Modeler:

For a procedure with the following array field:

custname[0],J Smith
custname[1],J Brown
custname[3],T Jones

and the following numeric field:

custidx

The following expression:

custidx := FINDARRELEMENT (“CUSTOMER”, -1, “J Brown”)

sets the field custidx to the index of the element that contains the value J Brown in the custname array. It starts the search at the first element in the array and searches the array until it finds the value. custidx will be set to a value of 1.

TIBCO Business Studio

custidx = IPEArrayUtil.FINDARRELEMENT("custname", -1, "J Brown");