One-Line Diagram Kit Help
 

Grouping Conditions in a Custom Filter

As discussed in the Combining Conditions in a Custom Filter topic, the Toggle button allows you to switch all of the conditions in a custom filter so that they are connected by AND statements (more restrictive) or connected by OR statements (less restrictive). However, the Toggle button applies to all of the conditions, requiring you to use either AND or OR statements between all conditions. For example, the custom filter would result in either the query Condition 1 AND Condition 2 AND Condition 3 or the query Condition 1 OR Condition 2 OR Condition 3. However, there may be times where you want to mix the AND and OR statements, for example in a query such as (Condition 1 AND Condition 2) OR Condition 3. In this situation, you can group conditions so that you mix the AND and OR statements.

To group conditions:

  1. Create the conditions you need for your filter, as discussed in the Creating a Condition in a Custom Filter and the Combining Conditions in a Custom Filter topics. When you first create the conditions, they are combined with AND statements, which can be toggled to OR statements.

The remaining examples in this procedure assume you want to group these conditions so that the first two are combined by an AND statement and separated from the third condition by an OR statement. The corresponding query would be (Condition 1 AND Condition 2) OR Condition 3, or more specifically (Starts with 'Sub' AND Does not start with 'Subscr') OR = 'System-1'. In plain terms, this would result in all diagram names beginning with the letters Sub, as long as they do not begin with the letters Subcr, or the diagram name System-1.

  1. Select the conditions you want to place in the same group:

    • You can select a group of conditions in a sequence by holding down the SHIFT key on your keyboard as you click the first and last condition you want to place in the group.

    • You can select conditions in different places by holding down the CTRL key on your keyboard as you click each condition.

Using the above example, you would select the first two conditions so that they will be grouped together.

  1. Click the 'And' Group button or the 'Or' Group button, depending on whether you want to use the AND or OR statement with that group. Using the example above, you would click the 'And' Group button.

Note: You can repeat steps 2 and 3 for each set of conditions you want to group (for example, if you were working with a more complex filter). Also, you can ungroup the group of conditions later if necessary by selecting them and then clicking the Ungroup button.

  1. Using the above example, by default the query would still contain AND = 'System-1' (instead of OR) because the system initially sets the statements to AND. Click the third condition to select it, and then click the Toggle button to toggle the statement to OR.

  1. To apply the specified filter, click the OK button.