Grouping and ordering evaluation of conditions - Use Records - Foundation 24.1 - Foundation 24.1 - Ready - Perceptive Content - external

Use Records

Platform
Perceptive Content
Product
Use Records
Release
Foundation 24.1
License

When you group and reorder multiple search conditions for a view or filter, you determine the method in which the search conditions are evaluated to return the results you want.

Evaluation order of conditions

When building a multiple-condition view or filter, it is important to understand the order in which Perceptive Content evaluates (or applies) the individual conditions. If all of your conditions are connected by AND operators, you can leave them ungrouped, as in Example 1.

Example 1

In this example, all the search conditions are connected by AND operators. For this reason, you can leave the conditions ungrouped. The search expression contains the following three conditions:

Drawer is equal to Accounts Receivable
AND Field1 is not equal to Region Two
AND Field4 is greater than 2010

In the above example, for an item to be returned by the search, all three conditions must be true. No grouping is necessary because [A AND (B AND C)] is equivalent to [(A AND B) AND C]. If any condition evaluates to false, the item does not appear in the results grid.

Example 2

In this example, you include an OR operator in the conditions. For this reason, you must group them to ensure uniform order of evaluation. The search expression below shows one effect of grouping conditions.

Ungrouped Grouped
Drawer is equal to Accounts Receivable
OR Field1 is equal to Region 2
AND Submit Date is greater than 2010
[(Drawer is equal to Accounts Receivable OR Field1 is equal to Region 2) AND Submit Date is greater than 2010]

In the above example, grouping the first two conditions ensures that (Drawer is equal to Accounts Receivable OR Field1 is not equal to Region Two) is evaluated first. If this grouped condition evaluates to false, the remaining AND condition is ignored, and the item does not appear in the search results grid. However, if the grouped condition evaluates to true, then the third condition must also evaluate to true for the item to appear in the search results grid.

Example 3

In this example, you include an OR operator in the conditions and group the second and third conditions with an AND operator. The search expression below shows one effect of grouping conditions.

Ungrouped Grouped
Drawer is equal to Accounts Receivable
OR Field1 is equal to Region 2
AND Submit Date is greater than 2010
(Drawer is equal to Accounts Receivable OR (Field1 it equal to Region 2 AND Submit Date is greater than 2010))

In the above example, grouping ensures that the grouped second and third conditions (Field1 is equal to Region 2 AND Submit Date is greater than 2010) are evaluated first. The ungrouped first conditions is evaluated one of two ways:

  • If the grouped conditions evaluate to true, the condition is satisfied, the condition (Drawer is equal to Accounts Receivable) is ignored, and the item appears in the search results grid.
  • If the grouped conditions evaluate to false, the condition (Drawer is equal to Accounts Receivable) is evaluated. If this condition evaluates to true, the item appears in the search results grid. If the condition evaluates to false, the item does not appear.

Grouping three or more conditions

You can group three or more conditions by creating one group using two conditions and then grouping it with a condition above or below the grouped row. The adjacent row can be a single condition, or it can be a group. The following examples show different ways of grouping three conditions. The condition rows are numbered in the examples for quick reference. Row numbers do not appear in the Search tab.

Example 1: Grouping rows 1 and 2 first

Before grouping, the conditions of search expression are:

1 Drawer is equal to Accounts Receivable
2 OR Field1 is equal to Region 2
3 AND Submit Date is greater than 2010

First, you group rows 1 and 2, and then click AND in the grouped row to change it to OR. The search expression becomes:

1 Drawer is equal to Accounts Receivable OR Field1 is equal to Region 2)
1) AND Submit Date is greater than 2010

Then, you group rows 1 and 2 again. The search expression becomes:

1 ((Drawer is equal to Accounts Receivable OR Field1 is equal to Region 2) AND Submit Date is greater than 2010)

Example 2: Grouping rows 2 and 3 first

Before grouping, the conditions of the search expression are:

1 Drawer is equal to Accounts Receivable
2 OR Field1 is equal to Region 2
3 AND Submit Date is greater than 2010

First, you group rows 2 and 3. The search expression becomes:

1 Drawer is equal to Accounts Receivable 2 OR (Field1 is equal to Region 2 AND Submit Date is greater than 2010)

Then, you group rows 1 and 2, then click the first AND in the grouped row to change it to OR. The search expression becomes:

(Drawer is equal to Accounts Receivable OR (Field1 is equal to Region 2 AND Submit Date is greater than 2010))