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

EquipStateBrowseGetField

The EquipStateBrowseGetField function returns the value of the particular field in a record to which the data browse cursor is currently referencing. This function uses the field name whose value needs to be returned.

This function is a non-blocking function. It does not block the calling Cicode task.

Syntax

STRING EquipStateBrowseGetField(LONG Session, STRING Field)

Session:

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

Field:

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

Name – the state name

Equipment – equipment name

Delay – entry command delay

Period – repeat command period

Priority – the state priority

Description – state description

DRmode – demand-response mode of this state

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. The last error should be checked in this instance to determine if an error has actually occurred.

Related Functions

EquipStateBrowseOpen, EquipStateBrowseFirst, EquipStateBrowseNext, EquipStateBrowseNumRecords, EquipStateBrowsePrev, EquipGetProperty

Example

ErrSet(1);
		INT error;
		fieldValue = EquipStateBrowseGetField(iSession, sFieldName);
		error = IsError();

		IF(error <> 0) THEN
			//return error
			ELSE
			//successful
		ErrSet(0) 
			end

See Also

Equipment Database Functions

Published June 2018