Operations Between Selections

<< Click to Display Table of Contents >>

Navigation:  Selections > Working With Selection Results >

Operations Between Selections

While the DonorQuest selection process allows you to create a selection result based on practically any conceivable condition, there may be times when it is easier to break your work down into smaller steps, especially if the final result you need is easier to conceptualize in term of existing selection results you already have. DonorQuest has four very powerful operations you can perform between selection results. These four operations are drawn from set theory in mathematics, but the ideas behind them are very simple. DonorQuest allows you to combine the records of multiple results (eliminating any duplicates), find the records multiple results have in common, take the records in one or more results out of another (subtraction), or find all the records that were left out of a result. From the language of Set Theory, the operations are known as the Union Set, the Intersection Set, Difference Set, and the Inverse Set. But here they are in plain English:

Combining Selection Results (Union Set)

You are able to combine two (or more) selection results in DonorQuest. This may be desirable, for example, if you have completed two or three different selections for a mailing, but would like to only print one batch of labels or export one file. You can only combine selection results which are from the same dataset, and based on the same table -- usually the Header table. The combination process will produce an entirely new selection result to hold the combined records, leaving the original selection results as they were. Any duplicate records are automatically eliminated from the combined result. For example, even if donor John Smith is in two or more of the selection results you are combining, he will only be in the final result once. Likewise, if you are combining several donation results, you can be assured that each unique donation record will only appear in the final result once.

 

To combine two or more results, open the Selection Results window by clicking on the Results button of the DonorQuest toolbar. Then, use the Mark button of the Selection Results window to mark all of the results you want to combine. If you want to mark a lot of consecutive results, you can do so by typing Alt-M repeatedly (or holding the key combination down). Once you have marked all of the results you wish to combine, click on the Selections menu, then choose Combine All Marked Results (Union Set). The following dialog will appear, allowing you to enter a name for the new selection result which will be created to hold the combination of all the marked results:

 

Combining Selection Results

 

Type a name and click OK to complete the combination.

Finding Records In Common (Intersection Set)

The Intersection Set operation allows you to find all the records two or more marked selections have in common. For a record to be in the intersection, it must occur in all of the selection results you mark for processing. You can only intersect selection results which are from the same dataset, and table -- usually the Header table. The intersection process will produce an entirely new selection result to hold the records all the results have in common, leaving the original selection results as they were. This can be useful if, for example, you have two or more selection results, and you would like a composite result with the records which meet all of the conditions in the results you are considering. This is the equivalent of "ANDing" all the conditions of all the results you are intersecting. To intersect multiple results, open the Selection Results window by clicking on the Results button of the DonorQuest toolbar. Then, use the Mark button of the Selection Results window to mark all of the results you want to intersect. If you want to mark a lot of consecutive results, you can do so by typing Alt-M. Once you have marked all of the results you wish to intersect, click on the Selections menu, then choose Find Records Common To All Marked Results (Intersection Set). Enter a name for the new result to hold the common records and click OK to complete the intersection.

Subtracting One Selection From Another (Difference Set)

The Difference Set operation allows you to create a new result which will hold all of the records that are left when you subtract one selection from another. Here is an example:

 

 Selection 1                Selection 2                Difference Set

 John Smith                Justin Hayward        Jane Doe

 Jane Doe                John Smith                Roger Waters

 Justin Hayward

 Roger Waters

 

In the above example if you were to subtract Selection 2 from Selection 1, you would get what is shown in the Difference Set column, and those records would be placed in a new selection result. If we had two selections in DonorQuest named Selection 1 and Selection 2, to perform the difference operation shown above we would mark both Selection 1 and Selection 2, then leave the cursor positioned on Selection 1. Then, click the Selections menu and choose Subtract One Or More Results From Another (Difference Set).

 

It is also possible to subtract multiple selections from a single selection. In our example above, if we had a Selection 3, and we want to subtract both it and Selection 2 from Selection 1, we would mark all three, then again leave the cursor positioned on Selection 1 and click Selections, Subtract One Or More Results From Another (Difference Set). Just remember the cursor (blue highlight) in the Selection Results window must always be left on the one selection result you are doing all the subtracting from before you perform the difference operation.

Inverting A Selection (Inverse Set)

This selection operation can only be performed on one selection at a time. It simply creates a new result which has all of the records not in the result. So for example, if you had a selection result of all the people who live in the state of New Hampshire, creating the inverse of that result would give you have all of the people in your database who live in a any state other than New Hampshire. To apply this operation to a selection, highlight the selection in the Selection Results window and click Selections, Create The Inverse Of As A New Result (Inverse Set).

Convert To Header Orientation

This is simply a quick and convenient way to take a selection originally based on one of the tables for which there can be many records for a given donor (Donations, Pledges, etc.) and convert it to a selection based on the Header table, for which there can only be one record per donor. It is the equivalent of running the selection again, using Header as the source table. This can be run by highlighting a selection result, then clicking on the Selections menu and choosing Convert To Header Orientation As A New Result.