FINDCASES

Usage

TIBCO iProcess Workspace (Browser)

TIBCO iProcess Workspace (Windows)

Filter cases and return the count of cases based on the applied filter.

Syntax

FINDCASES (procname, filter, arrayname, sort)

where:

procname (text) is the procedure name.
filter is a text string specifying the filter criteria to be applied on the cases.

For more information about filter criteria, see the "Filtering Work Items and Cases" topic in TIBCO iProcess Server Objects (Java) Programmer’s Guide.

Note: Ranges to filter cases are not supported in the case of FINDCASE expressions.
arrayname (text) is the name of the array (numeric) field where the filtered case numbers are stored.
Note: The arrayname must be in quotation marks. For example, if the array field name is CASELIST, then it must be entered in the expression as “CASELIST”.
sort is a text string specifying the sorting order.

For more information about sorting criteria, see the “Sorting Work Items and Cases” topic in TIBCO iProcess Server Objects (Java) Programmer’s Guide.

Returns

A numeric value containing the count of cases based on filter or one of the following numeric values:

Value

Description

0 No cases are found

-1

Error in parameter

-2

Error in format

-3

System error

-4

Any other error. Check logs for further info.

Example

This example returns the count in TOTCASE and populates the CASELIST array with case numbers filtered on "ACCTYPE=‘PERSONAL’ AND REGION='EUROPE'” and sorted on “SW_CASEDESC,-SW_CASENUM/R”.

TOTCASE:=FINDCASES(“CARPOOL”, “ACCTYPE=‘PERSONAL’ AND REGION='EUROPE'”, "CASELIST", “SW_CASEDESC,-SW_CASENUM/R”);

GETCASE

Usage

TIBCO iProcess Workspace (Browser)

TIBCO iProcess Workspace (Windows)

Return a text string value of the field for a given procedure, case number, and field name.

Syntax

GETCASE (procname, casenum, fieldname)

where:

procname (text) is the procedure name.
casenum (numeric) is the case number.
fieldname (text) is the name of a case field for which detail is required. Can be system or custom case fields.

Returns

A text string that matches the value of the field specified in fieldname for the given casenum.

Returns SW_NA in case of error or undefined field.

Example

This example returns the type of the vehicle in VTYPE, of the first case that matches the criteria "ACCTYPE=‘PERSONAL’ AND REGION='EUROPE'” and sorted on “SW_CASEDESC,-SW_CASENUM/R”.

TOTCASE:=FINDCASES(“CARPOOL”, “ACCTYPE=‘PERSONAL’ AND REGION='EUROPE'”, "CASELIST", “SW_CASEDESC,-SW_CASENUM/R”);
VTYPE:=GETCASE(“CARPOOL”, CASELIST[0], “VEHICLE_TYPE”);