How To: Use Advanced Filter Conditions

When you use the An advanced condition is true rule condition, you can specify advanced conditions.

Feature Description
Conditions

Specify conditions containing a value on the left, operator, and a value on the right. You can type a value or use the context browser to drag and drop a value. As you add conditions they are listed and allocated a number on the left. You can use this number to build or edit your expression. To remove a condition, you must select the entire condition and click Remove. You can use view and form data with comparison operators such as:

  • Equals or Not Equals
  • Greater Than or Less Than
  • Greater Than Equals or Less Than Equals
  • Contains
  • Starts With or Ends With
  • Is Empty or Is Not Empty
The same principles are applied here as in the Expression Builder.

Expressions Combines the conditions using logical operators such as And and Or. You can:
  • edit the logical operators by clicking on the down arrow.
  • change the order of the conditions by clicking on the down arrow next to the number and select another condition.
  • add brackets by clicking on the white spaces between each condition to group conditions as shown in the image above. If you do not apply brackets, the Or and And operators have the same precedence. By applying brackets, you can specify the order of execution.
Make sure that your expression is valid when you change items such as condition order, operators and brackets. K2 validates the expression pattern for items such as missing brackets etc, but not the validity of the expression.
Preview Shows the expression in preview mode

The following is an example of an expression tree:

which evaluates to the following:
(((1 OR 2) AND 2) AND 4)
In this example, the OR executes first and then the two AND operators.