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:
- Open Preferences -> Template, and add one of the fields you never use (I picked "Maiden Name"). This will be your categorisation field.
- Switch to Finder and navigate to /System -> Library -> FrameworksAddressBook.framework -> Versions -> Current -> Resources, and pick your localisation folder. (I assume that is English.proj for US Americans.)
- Open the file ABLabelsAndProperties.strings in a text editor of your choice (if you want to play it safe, make a copy of it first), and find the row where the string for your chosen field is defined. In my (Swedish) case, there was a row like this:
Change that to, for example:"MaidenName" = "Namn som ogift""MaidenName" = "Categorisation" - Do the corresponding change in the file ABLabels.strings.
- Save the files (administrator password needed), and restart your computer. When you open Address Book, you should see a field named Categorisation in the record template.
- Open Preferences -> Template, and add one of the fields you never use (I picked "Maiden Name"). This will be your categorisation 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.
- Choose categories. Well, this is at you own choice. In this example, I will assume the categories Friends, Family, Colleagues, and Inactive.
- 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.
- 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.
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...]
