Filter Parameters for Data Queries

ParametersDescription
Filter TagThe single tag name used when applying the filter criteria.
Note: You can enter your filter conditions using Filter tag, Filter Comparison Mode, and Filter Comparison Value or you can put that all that information in a single Filter Expression.
Filter ExpressionAn expression which includes one or more filter conditions. The type of conditions used are:
  • AND Condition
  • OR Condition
  • Combination of both AND and OR

FilterExpression can be used instead of FilterTag, FilterComparisonMode and FilterValue parameters. There is no maximum length for a filter expression.

Filter Mode The type of time filter:
  • ExactTime — Retrieves data for the exact times that the filter condition is True (only True).
  • BeforeTime — Retrieves data from the time of the last False filter condition up until the time of the True condition (False until True).
  • AfterTime — Retrieves data from the time of the True filter condition up until the time of next False condition (True until False).
  • BeforeAndAfterTime — Retrieves data from the time of the last False filter condition up until the time of next False condition (While True).

The Filter Mode defines how time periods before and after transitions in the filter condition should be handled.

For example, AfterTime indicates that the filter condition should be True starting at the timestamp of the archive value that triggered the True condition and leading up to the timestamp of the archive value that triggered the False condition.

Filter Comparison ModeThe type of comparison to be made on the filter comparison value:
  • Equal — Filter condition is True when the Filter Tag is equal to the comparison value.
  • EqualFirst — Filter condition is True when the Filter Tag is equal to the first comparison value.
  • EqualLast — Filter condition is True when the Filter Tag is equal to the last comparison value.
  • NotEqual — Filter condition is True when the Filter Tag is NOT equal to the comparison value.
  • LessThan — Filter condition is True when the Filter Tag is less than the comparison value.
  • GreaterThan — Filter condition is True when the Filter Tag is greater than the comparison value.
  • LessThanEqual — Filter condition is True when the Filter Tag is less than or equal to the comparison value.
  • GreaterThanEqual — Filter condition is True when the Filter Tag is greater than or equal to the comparison value.
  • AllBitsSet — Filter condition is True when the binary value of the Filter Tag is equal to all the bits in the condition. It is represented as ^ to be used in Filter Expression.
  • AnyBitSet — Filter condition is True when the binary value of the Filter Tag is equal to any of the bits in the condition. It is represented as ~ to be used in Filter Expression.
  • AnyBitNotSet — Filter condition is True when the binary value of the Filter Tag is not equal to any one of the bits in the condition. It is represented as !~ to be used in Filter Expression.
  • AllBitsNotSet — Filter condition is True when the binary value of the Filter Tag is not equal to all the bits in the condition. It is represented as !^ to be used in Filter Expression.
  • Alarm Condition — Specifies an alarm condition to filter data by. For example, Level.
  • Alarm SubCondition — Specifies an alarm sub-condition to filter data by. For example, HIHI.
The Filter Comparison Mode defines how archive values for the Filter Tag should be compared to the Filter Value to establish the state of the filter condition. If a Filter Tag and Filter Comparison Value are supplied, time periods are filtered from the results where the filter condition is False.
Note: Filter Comparison Mode is only used if Filter Tag is filled in.
FilterComparison ValueThe value to compare the filter tag with when applying the appropriate filter to the data record set query (to determine the appropriate filter times).
Note: Filter Comparison Value is only used if Filter Tag is filled in.