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

LibAlarmFilterForm

Note: This function is only available if the Lib_Controls project is included in the user project.

Displays a generic alarm filter pop-up for specifying filtering criteria for either an alarm list or a named filter. This function uses the AlarmFilterEdit family of Cicode functions to set the filter.

Note: If the user passes in the Animation number of an alarm list as its FitlerSrc argument, the filter set by this function will override the filter set by function AlarmSetInfo() as both functions modify the internal filter associated with the alarm list.

Syntax

INT LibAlarmFilterForm([INT FormType [, STRING FilterSrc [, STRING Title [, INT Mode [, STRING AppliedCallbackFn]]]]])

nFormType

Type of alarm filter form:

sFilterSrc

The source where the filter will be applied to. It can either be the Animation Number (AN) of an alarm list or the name of a filter created via the AlarmFilterOpen() Cicode function. If it is not specified, it is defaulted to -1 which refers to all alarm lists on the current page. If the FilterSrc cannot be opened, it will prompt the user to create the filter source.

sTitle

The title for the filter form. If it is not specified or left blank, the title is determined by the form type:

nMode

The mode of the form:

sAppliedCallbackFn

The callback function statement to be called when the criteria (rules) specified in the form is applied either via the OK or Apply buttons. Like other callback functions available to other library controls genie. The callback function supports keyword substitutions during callback:

#Filter - The FilterSrc specified when showing the form

#Result – The result of the filter application. See return value for details.

Return Value

1 if filter has been applied, 0 if filter has been cleared, or -1 if no change is made

Related Functions

AlarmResetQuery,

See Also

Alarm Filter Help available when using the New Alarm Filter Form at Runtime

Published June 2018