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:

  1. Open the Query Builder.
  2. Click the Conditions tab and add all conditional statements.
  3. If required, group the conditional statements.
  4. Select the Not check box of a conditional statement, or the first statement in a group.
  5. Click OK 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