State Expressions Tab

In the State Expressions tab, the filter expression and rank can be set for each state defined. 

Each filter expression defined for a state, will apply the filter criteria to the events triggering the action.  If any events are returned after the filtering, then those will be applied and evaluated against other state filtered events based on rank.

The example below shows:

State2:  [EventType] = ‘Practice’ where [EventType] is the field name.  (Brackets surround field names of the event).

When the state popup is selected you will see the filter expression editor.  This will allow you to build expressions for the state.  In the example below, we added an OR operator so that State 2 will be triggered when [EventType] = ‘Practice’ OR [EventType]=’Class’.

 

This expression filters all events that have [EventType] = ‘Practice’ OR [EventType]=’Class’

 and assign them to State 2.

The Test button will parse the expression and let you know if it has any syntax errors.  Green is good.  Red indicates the expression is not formatted correctly.

Note:  If you leave the expression blank, the result will include ALL events for the state.  Make sure the rank for this expression is a higher number (lower priority) than other states that have expressions defined.

The following shows a syntax error in the expression:

The Rank field allows you to rank the priority (1-16) of each state.  The rank only applies when more than one state has event results.  The highest ranking event state (lowest number) will win. 

Note:  The Rank has nothing to do with BACnet Priority.  Rank determines which events take priority when events overlap from different states.