10.4: Create a classification feature in Address Book
Jan 03, '06 05:57:00AM
Contributed by: Anonymous
Ever since I started using Address Book, I have wanted to be able to use some kind of feature classification of records (like enum types in Java/C, or value lists in File Maker). Using Smart Groups and a previous hint on Mac OS X Hints, I managed to set up an acceptable system.
It's not perfect (for example, I have not been able to get iSync to understand Smart Groups), but it works reasonably well.
Here's how I did it...
- Set up a category field:
- Choose categorisation labels:
- Choose categories. Well, this is at you own choice. In this example, I will assume the categories Friends, Family, Colleagues, and Inactive.
- Design categorisation labels. If you have chosen one of the more-common fields as your category field, you can restrict the Smart Group search to that field. But if you, as I, have chosen "Maiden Name," then the Smart Group search will have to be for the entire record.
Therefore, the labels you use to categorise the records must be unique strings. The search engine used for the Smart Groups (Spotlight) is quite focused on words, and so you cannot use dashes, underscores, or something similar to make the category labels unique. My solution was to prefix each word with a letter that rarely starts a Swedish word. For English, that could be the letter x. The resulting labels are thus xfriends, xfamily, xcolleagues, and xinactive.
- Set up Smart Groups:
- Create one Smart Group for each category, or for each combination of categories that you like to have. In this example, there is one Smart Group for Friends ('card contains xfriends and card does not contain xinactive'), one for Family ('card contains xfamily and card does not contain xinactive'), etc.
- Categorising your records:
- If you already have a lot of records categorised in 'stupid' groups, then there is some work for you to do. Basically, you have to go through all records and add categorisation labels to them. If you like AppleScript, you can probably write a script to do the job for you. Otherwise, copy-and-paste will have to do.
If you want to put a single record in more than one category, just put blanks between the category labels.
Bonus hint #1: If you are unsure if you have categorised all records, create a Smart Group with criteria that excludes all records containing any of the labels.
Bonus hint #2: If you do not want to have all records in Address Book on your iSynced device (cell phone, iPod, ...), you can have a separate 'stupid' group in Address Book, for example called 'My Cell Phone.' Before iSyncing, empty that group, and then drag-and-drop (or copy-and-paste) the contents of the relevant Smart Groups to 'My Cell Phone.' Then restrict the iSyncing to that group.
[robg adds: I haven't tested this one...]
Comments (10)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20051226142158131