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.
The new values are discarded if the cursor is moved away from the current alarm summary entry before AlmSummaryCommit is made in the data browse session
This function is a blocking function. It blocks the calling Cicode task until the operation is complete.
Note: This function will only work while the record is writable which is controlled by the ArchiveAfter Parameter. Refer to the topic Configure the Archiving Parameters in the main help for more information.
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 |
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
Published June 2018