The TrnBrowseGetField function retrieves the value of the specified field from the record the data browse cursor is currently referencing.
This function is a non-blocking function. It does not block the calling Cicode task.
Syntax
STRING TrnBrowseGetField(INT Session, STRING FieldName)
Session
The handle to a browse session previously returned by a TrnBrowseOpen call.
FieldName
The name of the field that references the value to be returned. Supported fields are:
ACQERROR, AREA, EQUIPMENT, EXPRESSION, FILENAME, FILES, ITEM, LSL, PRIV, RANGE, SDEVIATION, SPCFLAG, STORMETHOD, SUBGRPSIZE, TIME, TRIGGER, USL, XDOUBLEBAR.
See Browse Function Field Reference for information about fields.
Return Value
The value of the specified field as a string. An empty string may or may not be an indication that an error has been detected. This should be checked in this instance to determine if an error has actually occurred.
Related Functions
TrnBrowseClose, TrnBrowseFirst, TrnBrowseNext, TrnBrowseNumRecords, TrnBrowseOpen, TrnBrowsePrev
Example
STRING fieldValue = "";
STRING fieldName = "TYPE";
INT errorCode = 0;
...
fieldValue = TrnBrowseGetField(iSession, sFieldName);
IF fieldValue <> "" THEN
// Successful case
ELSE
// Function did not succeed
END
...
See Also
Published June 2018