Cicode Programming Reference > Cicode Function Categories > Alarm Functions Introduction > AlmSummarySetFieldValue

AlmSummarySetFieldValue

The AlmSummarySetFieldValue function sets a new value for the specified field for the record the data browse cursor is currently referencing. The value is not committed until a call to AlmSummaryCommit is made.

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

Syntax

AlmSummarySetFieldValue(iSession, sFieldname, sFieldValue)

iSession:

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

sFieldName:

The name of the field whose value is to be updated. Supported fields are:

AckTime

Alarm acknowledged time

Comment

Alarm comment

OffMilli (for time stamped alarms only)

Alarm millisecond off time

OffTime

Alarm OFF time

OnMilli (for time stamped alarms only)

Alarm millisecond on time

OnTime

Alarm ON time

See Browse Function Field Reference for additional information about fields.

sFieldValue:

The field value to update.

Return Value

0 (zero) if the alarm browse session exists, otherwise an error is returned.

Related Functions

AlmSummaryAck, AlmSummaryClear, AlmSummaryClose, AlmSummaryCommit, AlmSummaryDelete, AlmSummaryDeleteAll, AlmSummaryDisable, AlmSummaryEnable, AlmSummaryFirst, AlmSummaryGetField, AlmSummaryLast, AlmSummaryNext, AlmSummaryOpen, AlmSummaryPrev

Example

STRING sFieldValue = "NEW_COMMENT";
STRING sFieldName = "COMMENT";
INT errorCode = 0;
...
errorCode = AlmSummarySetFieldValue(iSession, sFieldname, sFieldValue);
IF errorCode = 0 THEN
// Successful case
ELSE
// Function returned an error
END
...

See Also

Alarm Functions