Cicode Programming Reference > Cicode Function Categories > Tag Functions > TagBrowseGetField

TagBrowseGetField

The TagBrowseGetField function retrieves the value of the specified field from the record the data browse cursor is currently referencing.

Syntax

STRING TagBrowseGetField(LONG Session, STRING FieldName)

Session:

The handle to a browse session previously returned by a TagBrowseOpen call.

Fieldname:

The name of the field that references the value to be returned. Supported fields are:

ADDR, ARR_SIZE, CLUSTER, COMMENT, DEADBAND, ENG_FULL, ENG_UNITS, ENG_ZERO, EQUIPMENT, FORMAT, IODEV, PSI_TYPE, RAW_FULL, RAW_ZERO, SCALED_TYPE, TAG, ITEM, TYPE

For details on these fields refer to the Browse Function Field Reference.

Return Value

The value of the specified field as a string if successful. An empty string may or may not be an indication that an error has been detected. The last error should be checked in this instance to determine if an error has actually occurred. -1 if unsuccessful.

Related Functions

TagInfoEx, TagInfo, TagBrowseClose, TagBrowseFirst, TagBrowseNumRecords, TagBrowseOpen, TagBrowseNext,

Example

// GetField
       ErrLog("CLUSTER: " + TagBrowseGetField(TBHandle , "CLUSTER") +
        ", Error = " + IntToStr(IsError()));
        ErrLog("IODEV: " + TagBrowseGetField(TBHandle , "IODEV") +
        ", Error = " + IntToStr(IsError()));
        ErrLog("TAG: " + TagBrowseGetField(TBHandle , "TAG") +
        ", Error = " + IntToStr(IsError()));
       END

See Also

Tag Functions

Published June 2018