NEXTARRELEMENT
Usage
TIBCO iProcess Workspace (Browser)
TIBCO iProcess Workspace (Windows)
Returns the index number of the next assigned array element in the given array field after the start element. This is useful when an application does not store data in contiguous array elements. For more information about using array fields, see “Using Arrays Fields” in TIBCO iProcess Modeler Advanced Design.
Syntax
NEXTARRELEMENT (arrayname, startelement)
where:
| • | arrayname (text) is the name of the array field on which to perform the search. |
| • | startelement (numeric) is the element index number to start the search from or -1 for the first assigned element. |
Returns
One of the following numeric values:
|
Value |
Description |
|
-1 |
No more array elements 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
and the following text field:
custname
The following script will build a comma separated list of all the customer names:
custidx := -1
custlist := ””
while ((custidx:= NEXTARRELEMENT (“custname”, custidx))<>-1)
if (strlen (custlist) >0)
custlist := custlist + ”,”
endif
custlist:= custlist + custname [custidx]
wend
TIBCO Business Studio
while ((custidx = IPEArrayUtil.NEXTARRELEMENT("custname",
custidx))!=-1)
{ if (IPEStringUtil.STRLEN(custlist) >0)
{custlist = custlist + ",";
}
else
{custlist = custlist + custname [custidx];
}
}