Skip to main content

Filtering Data

Filter Expressions

A filter expression is a Boolean Expression. A Boolean Expression can be any of the following:

  • <Boolean Expression> AND <Boolean Expression>
  • <Boolean Expression> OR <Boolean Expression>
  • <Boolean Expression> XOR <Boolean Expression>
  • NOT(<Boolean Expression>)
  • (<Boolean Expression>)

A Boolean Expression can also be the result of a comparison:

  • <Numerical Expression> == <Numerical Expression>
  • <Numerical Expression> != <Numerical Expression>
  • <Numerical Expression> > <Numerical Expression>
  • <Numerical Expression> < <Numerical Expression>
  • <Numerical Expression> >= <Numerical Expression>
  • <Numerical Expression> <= <Numerical Expression>

A Numerical Expression can be any of the following:

  • <Numerical Expression> + <Numerical Expression>
  • <Numerical Expression> - <Numerical Expression>
  • <Numerical Expression> * <Numerical Expression>
  • <Numerical Expression> / <Numerical Expression>
  • <Numerical Expression> ^ <Numerical Expression>
  • (<Numerical Expression>)
  • <Identifier>
  • <Number>

An Identifier should match the regular expression ([Pp]@)?:?[0-9a-zA-Z_"."]+. That is, it should be some combination of digits, letters, _, and ., optionally preceded by P@/p@ and/or :.

A Number may be in decimal or scientific notation, with a + or - for sign. Valid examples:

  • 1
  • -1.2
  • .2
  • 0.2E-20
  • +1.e+20

Standard order of operations is followed:

  1. Parentheses
  2. Exponent
  3. Multiplication and Division
  4. Addition and Subtraction
  5. Comparison (==, !=, >, <, >=, <=)
  6. NOT
  7. AND
  8. XOR
  9. OR

Future Enhancements

Some of these features might be supported in future updates, if there is demand:

  • Boolean literals
  • Alternate forms of operators (e.g. EQ instead of ==)
  • Scientific vs non-scientific values