News & Articles
Tips & Tricks
Add-On Products
CRM & Contact Mgt
MX-Contact
Download the free Personal Edition of MX-Contact, the complete Outlook CRM, Contact Management and Sales Automation System

 


 

 

 

 

 

 

 

 






4 Building a Filter using the Query Builder Tab

For the purposes of demonstrating use of the Query Builder tab, we will take the same exercise as defined in the article on Using the SQL Tab, namely create a filter restricting the Contacts view to all marketing decision makers located on the West Coast (of the United States).

As reviewed in that article, we can think of this condition as:

(Marketing Decision Makers) AND (lives on the West Coast)

This equated to the conditions:

Job Title contains the word “Owner”

OR

Job Title contains the word “Manager”.

ANDed with the conditions:

State = “WA”

OR

State = “OR”

OR

State = “CA”

To build a filter using the Query Builder page on the Filter dialog box, do the following:

  1. Click View -> Current View -> Define Views (for Outlook 2000 and 2002/XP), or View -> Arrange by -> Current View -> Define Views (for Outlook 2003).





  2. The Define Views/Current View Organizer screen will be displayed:




  3. Click New to create a new View, and enter the View Name (Leave the Type of view as Table):




  4. Click OK. You will then get the View Summary/Customize View dialog:





  5. In this example I’m working with a few fields that do not ordinarily appear in the default Views, namely Job Title and State. So it would be useful to see these fields in the View. To do this click on the Fields button on the View Summary/Customize View dialog:




  6. From the Available fields list (with Frequently-used fields selected in the drop down) Job Title and State in turn and click Add-> to move the fields to the right hand window showing the fields that will appear in the View.

  7. Use the Move Up and Move Down buttons to reposition these fields so that they will display where you’d like them to:





  8. Click OK to return to the View Summary/Customize View dialog.

  9. Click the Filter button on the View Summary/Customize View dialog box:




  10. Click the Filter button and then select the Query Builder page on the Filter dialog box:





  11. Use the Query Builder interface to build your query. When you construct a filter, you actually build a WHERE clause without the WHERE keyword. Notice that you can use the logical AND or logical OR operator to develop the query and move clauses up or down. Add the 2 conditions relating to the Job Title, and change the Logical Group field to an OR condition:




  12. Then add the conditions for the 3 State values:




  13. Click the SQL page shown in Figure 11-2 on the Filter dialog box, and check the Edit These Criteria Directly check box:



  14. Notice the 2 nested conditions are AND’ed together, but the conditions relating to the same field (Job Title and State) are OR’ed together inside each set of brackets. For more details on defining queries using the SQL Tab, refer to the following article:


    Outlook Views – Using the SQL Tab


  15. We then click OK to return to the Customize View screen. Then click OK to return to the Custom View Organizer, and Apply View to save and activate the view:






  16. All the Owners and Managers that are located on the West Coast are displayed in the View – mission accomplished.
1
2
3
4
5