Cicode Programming Reference > Cicode Function Categories > Equipment Database Functions > EquipRefBrowseOpen

EquipRefBrowseOpen

The EquipRefBrowseOpen function initiates a new browse session and returns a handle to the new session that can be used in subsequent equipment reference browse function calls.

This function is a blocking function. It blocks the calling Cicode task until the operation is complete.

Syntax

LONG EquipRefBrowseOpen(STRING Filter, STRING Fields [, STRING Sort] )

Filter:

A filter expression specifying the records to return during the browse. An empty string indicates that all records will be returned. Where a fieldname is not specified in the filter, it is assumed to be equipment name. For example, the filter "AAA" is equivalent to "name=AAA".

All string fields can be filtered based on regular expressions. Using operators other than = and <> will cause strings to not match the filter criteria. The following regular expressions are supported *expr, expr*, and *expr*.

Fields:

Specifies via a comma delimited string the columns to be returned during the browse. An empty string indicates that the server will return all available columns. Supported fields are:

EQUIP, REFEQUIP, REFITEM, ORDER, COMMENT, CLUSTER, REFCLUST, REFCAT, CUSTOM1, CUSTOM2, CUSTOM3, CUSTOM4, CUSTOM5, CUSTOM6,CUSTOM7, CUSTOM8.

See Browse Function Field Reference for information about fields.

Sort:

Comma delimited list of record fields to be returned in order of sorting preferences. For example(GROUP:D, ORDER:A)

Return Value

Returns an integer handle to the browse session. Returns -1 when an error is detected.

The returned entries will be ordered alphabetically by name.

Related Functions

EquipRefBrowseClose, EquipRefBrowseFirst, EquipRefBrowseGetField, EquipRefBrowseNext, EquipRefBrowseNumRecords, EquipRefBrowsePrev, EquipCheckUpdate, EquipGetProperty

Example

INT iSession;
...
iSession = EquipRefBrowseOpen("NAME=ABC*", "NAME,AREA", "GROUP");
IF iSession <> -1 THEN
// Successful case
ELSE
// Function returned an error
END
...

See Also

Equipment Database Functions

Published June 2018