Using Advanced Filter Criteria
By default, Microsoft Dynamics CRM applies AND logic to queries that include two or more search criteria. This means that results are limited to those records that meet all search criteria in the query. However, you also might be required to produce a report with records that match any of the search criteria. In this instance, you could use OR logic in Advanced Find to search multiple fields to find records that have matching data in any of the fields.
In this exercise, you will use the Group AND and Group OR functionality of the Advanced Find tool. As you saw earlier, the original criteria we applied to the Hot Opportunities In Chicago Market saved view included all opportunities that met the following criteria:
The opportunity probability is greater than 50.
The accounts are in the city of Chicago.
Now you will expand the criteria to include opportunities in Des Moines in addition to those in Chicago.
Launch Advanced Find if it is not open already.
In the Advanced Find query screen, in the Look for field, select Opportunities, and then select Hot Opportunities in Chicago Market in the Use Saved View list.
The criteria for the saved query is displayed.
Click the Show Details button.
In the Potential Customer (Account) section, click the Select field underneath the row that specifies the city as Chicago.
In the Select field, choose Address 1: City.
In the Enter Value field, enter Des Moines.
Because Microsoft Dynamics CRM uses AND logic by default, if you click Find at this point, your search will not return any results, because no single account record can have a primary address in both Chicago and Des Moines.
Click the arrow to the left of the first Address 1: City field, and click Select Row.
Click the arrow to the left of the second Address 1: City field, and click Select Row.
On the toolbar, click Group OR.
This selection will update the logic so that records that have a primary address in the city of Chicago or Des Moines will be returned in the results.
Click Find to see the results matching your new query.