Previous Topic: Composite True-False TestNext Topic: OR and <fallguy> Handling


Complex Composite True-False Test

The following example is a complex composite True-False test. It contains two sub-lookups, one of which contains two sub-tests.

(mapi with %sender% where dept IS "sales") AND
(mapi with %recipient% where (dept IS "marketing") AND (position IS "manager"))

If there is one sender and three recipients, then this command requires the following four lookup operations, three of which contain two sub-tests.

(
  mapi with oabassi@unipraxis.com where dept IS "sales") AND
  ((mapi with srimmel@unipraxis.com where (dept IS "sales") 
  AND (position IS "manager")) 
    OR
  (mapi with lsteel@unipraxis.com where (dept IS "sales") 
  AND (position IS "manager")) 
    OR
  (mapi with fschaeffer@unipraxis.com where (dept IS "sales") 
  AND (position IS "manager"))
)

For an operation to be true, all of its sub-operations must be true.

For the test itself to be true, the first simple lookup operation and at least one of the three other operations need to be true.

More information:

Address Book Lookup