Cicode Programming Reference > Cicode Function Categories > Alarm Filter Functions > AlarmFilterEditAppend

AlarmFilterEditAppend

The AlarmFilterEditAppend function takes a session handle and a filter expression as parameters. It appends the provided expression to the current filter session content without any validation. This does not apply to all filters on the list (see AlarmFilterEditCommit).

Syntax

INT AlarmFilterEditAppend(INT hSession, STRING FilterCriteria)

Session:

Session handle for the historical list previously returned by the function AlarmFilterEditOpen().

FilterCriteria:

Filter expression as a string. For example:"(Tag=A) OR (TAG=B)"

See the topic Implementing Alarm Filters Using Cicode in the main Citect SCADA help for more information about filter syntax.

Note: If a requested filter is too complex (for example, it contains too many conditions or too many nested brackets), the filter is cleared (no filter is used). The hardware alarm "Too many alarms in filters" is generated on the client components, and a tracelog error message is logged.

Return Value

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

Example

// This example shows how to update an edit session.
// This example requires that the edit session hEdit exists.
// This example shows how you would split the parts of the filter
// to avoid an overflow error when handling strings.				
INT nError;
nError = AlarmFilterEditSet(hEdit,"Tag");
nError = AlarmFilterEditAppend(hEdit,"=");			
nError = AlarmFilterEditAppend(hEdit,"Dig*");
nError = AlarmFilterEditCommit(hEdit);
sRet = AlarmFilterEditFirst(iHndl); // Tag=Dig*;
			

Related Functions

AlarmFilterEditSet

See Also

Alarm Filter Functions

Published June 2018