Linking Conditions
Learn about linking conditions.
You can change the operator (AND or OR) used to link conditions. Two options are available:
- Select Change to AND or Change to OR from the context menu next to the operator.
- Select the condition whose link operator you want to change and click on (Group AND) or (Group OR). Only the currently inactive option is available for selection.
Grouping criteria corresponds to placing them within brackets in a logical expression: For example, if you have defined the condition "A OR B OR C", and link the B and C sub-criteria with a logical AND, this results in the expression "A OR (B OR C).
You can also define conditions hierarchically and thus link multiple conditions. In the following example, the individual tiers of the hierarchy are indented:
Each condition is evaluated separately and then combined when the other linked conditions using the appropriate operator (AND/OR).
Examples of Linked Conditions
The following examples use queries applied to the Activity info area:
Comparing the contents of one or more fields with a value
Field1 = Value1 AND/OR Field2 = Value2 AND/OR Field3 = Value3 etc.
Example: To display your own and Mona Market’s completed visits, define the following condition:
Type = "Visit" AND Status = "Completed" AND (Rep = "Current Rep" OR Rep = "Mona Market").
Comparing the value in a catalog field to one or more values
CatField1 = Value1a OR Value1b OR Value1c
Example: You want to list all scheduled activities of the types "Visit", "Letter" and "E-mail". Define the following condition:
Type = "Visit" OR "Letter" OR "E-mail"
AND Status = 'Scheduled'
Comparing the contents of a field (not a catalog field) to more than one value
Field1 = Value1 AND Field2 < Value2 AND Field2 > Value2a AND Field3 = Value3 etc.
Example: You want to list all visits in the week from the 10th to 14th of November 2014. Define the following condition:
Type = "Visit" AND Starts on >= "10.11.2014" AND Starts on <= "14.11.2014"