Creating a query that will find contacts that are within a certain distance from a postal code, is great for finding potential donors or sustainers to invite to events. This query can be used on its own or added as an external query to a different query.
Note: for instructions on how to add an external query click Here
To create this query, set the query filter type to Contacts and select the Addresses database
In the select field, add the Address Id, Contact ID, and Primary Address Postal Code. These are important to add, especially when using this query as an external query in a separate query, as these are the link between the queries. When using an external reference query or subquery, you are telling the database that you want a list of IDs from one query to include, or exclude in some cases, in the other query. When adding the reference, it is important that the IDs are compatible, for example, you cannot join an address ID on a contact ID.
In the filter filed, add Postal Code. This will allow you to set a postal code for the database to find contacts within a certain distance.
In order to find contacts within X miles of the postal code, click on the set formula button and select Within X Miles of form the
Now you will be able to set the distance and the postal code in the two boxes that have appeared.