Tuesday, March 9, 2010

GoldMine: Search Phone Fields

A client asked: We need to search the Phone fields to quickly locate contacts. How do you search all three Phone fields?

One way to do this is by using a SQL query. Follow the steps below:

* Select Tools > SQL Query > Copy and paste the following:

select Accountno, Company, Phone1, Phone2, Phone3 from contact1 where coalesce(phone1,'') + '|' + coalesce(phone2, '') + '|' + coalesce(phone3, '') like '%(888)224-0649%'

* Enter a Name > Click Save (New Query)
* Click Query > Review results

Note that the format of the phone number is the format that is used by GoldMine when a number is entered. If you use a different phone format, make sure this is used consistently and is part of the SQL Query.

This will locate the phone number entered, however, to make it easier to use, you should develop a macro to enter the phone number (as opposed to opening and modifying the SQL query each time).

No comments: