Using "Not" in a Conditional Statement
You can insert NOT in front of a conditional statement or a group of conditional statements. If NOT is inserted in front of a group of conditional statements, it applies to all conditional statements within that group.
To insert NOT in front of a conditional statement or group:
- Open the Query Builder.
- Click the Conditions tab and add all conditional statements.
- If required, group the conditional statements.
- Select the Not check box of a conditional statement, or the first statement in a group.
- Click to run the query.
Example
Query Builder selects contacts who live anywhere in California other than Los Angeles or San Francisco.
This is how the grid on the Conditions tab appears for this example:
Not | ( | Field | Operator | Value | Case Sens | ) | And/Or |
---|---|---|---|---|---|---|---|
NOT | ( | Contact.Address.City | equal to | Los Angeles | True | OR | |
Contact.Address.City | equal to | San Francisco | True | ) | AND | ||
Contact.Address.State | equal to | CA | True | END |
Note: A query can contain subgroups within a group. If NOT is
used in front of a group, it applies to all subgroups contained within the
group.
Related topics