Microsoft Dynamics® CRM Training
Advanced Find AND OR Logic
An error occurred while loading the video. Please try again.
Advanced Find AND OR Logic
By default, Microsoft Dynamics CRM Online 2011 applies AND logic to queries in Advanced Find that include two or more search criteria. This means that results are limited to records that meet all search criteria in the query.
But there may be scenarios that require you to produce a report with records that match any of several criteria. This is where OR logic comes in handy. Meaning, a record meets Requirement A OR Requirement B, but not necessarily both
In this video, we'll utilize both the Group AND, as well as the Group OR functionality of the Advanced Find tool.
First let's create a view that shows us all hot opportunities in a designated city.
We begin by clicking on the Advanced Find button in the Data group of the ribbon. Once the Advanced Find window appears, in the Look for list, select Opportunities. This specifies the primary entity for which we will be executing the query.
In the Select field, choose Probability, select Is Greater Than or Equal To, and then enter "50" in the Enter Value field.
In the second row of the Advanced Find query, in the Select field, scroll down to the bottom of the list to the Related section and select Potential Customer (Account). This adds a data field from the Account record type to the search. This allows us to filter Opportunities based on attributes of the Accounts related to those Opportunities.
In the Select field, choose Address 1: City. Leave Equals selected in the Operator field, and in the Enter Value field, we'll type Irvine.
Now, click the Results button in the Show group on the Advanced Find tab of the ribbon.
We see our results and we can even save this as a personal view. To do so, click the Save As button in the ribbon. We'll label this view as "Hot Opportunities in the Irvine Market".
Now let's say we need to expand the criteria to include opportunities in the city of Redmond as well as Irvine. We start once again by opening the Advanced Find tool.
Make sure Opportunities is selected in the Look for field, and select "Hot Opportunities in the Irvine Market" in the Use Saved View field. The criteria for the Saved View should be displayed below.
On the Advanced Find tab of the ribbon, in the Query group, click the Details button in order to display the details of the query.
In the Potential Customer (Account) section, click the Select field underneath the row that specifies the city as Irvine.
In the Select field, choose Address 1: City. In the Enter Value field, we'll enter Redmond.
Since CRM Online uses AND logic by default, if we click Results at this point, we will not be presented with any records since no single Account record can have a primary address in two different cities.
To avoid this, click the arrow on the left of the first Address 1: City field and then click Select Row.
Now click the arrow to the left of the second Address 1: City field, and once again click Select Row.
On the Advanced Find tab of the ribbon, in the Query group, click the Group OR button. (Note the two lines we selected are now shown as belonging to the same OR group displayed to their left.) This updates the logic so that Opportunities for Accounts with a primary address in the city of Irvine or Redmond will be returned in the results (as long as they have a probability of 50 percent or more).
Click the Results button in the ribbon to see the results matching your new query
Thanks for watching.