Address Book Smart Groups: Not so smart

Posted by Pierre Igot in: Macintosh
May 16th, 2005 • 11:52 pm

One of the major drawbacks of Mac OS X’s Address Book as far as I am concerned is that it’s not really hierarchical. You can create groups of cards, but you cannot create groups of groups of cards.

More accurately, you can actually add a group (say, Group A) to an existing group (say, Group B), but it doesn’t really create a hierarchy. What it does is it adds some kind of “alias” of Group A inside Group B. But Group A is still a separate group at the root level.

I work for a number of different organizations, each of which has a number of employees that I communicate with on a regular basis. In order to keep things manageable, I want to create a group for each organization. I call each group “Work – xxx“, where “xxx” is the name of the organization. I also have a generic “Work” group that contains cards for people from smaller organizations for which I don’t need to create a separate “Work – xxx” group.

But then I want a rule in Mail that flags every incoming message that comes from any “Work” group with a specific colour and a specific incoming mail sound. Thanks to the pseudo-hierarchical trick described above, this is fairly easy. I just have an “alias” of each “Work – xxx” group in my generic “Work” group, and then I have a Mail rule with a criterion that asks Mail to check if the sender is in group “Work“.

Because the “Work” group contains aliases to each of the other “Work – xxx” groups, Mail is smart enough to check if the sender is in group “Work” or in any of the “Work – xxx” groups. In other words, I do not have to create a Mail rule with a criterion that checks if the sender is in group “WorkOR in group “Work – XXXOR in group “Work – YYYOR in group “Work – ZZZ“.

This would be rather tedious and would require that I update the Mail rule each and every time I add a new “Work – xxx” group to my Address Book. The group aliases enable me to avoid this. As it is, each time I create a new “Work – xxx” type of group, all I have to do is add an alias to this group in my generic “Work” group, and Mail will automatically add all the e-mail addresses of the people in the “Work – xxx” group to the list of e-mail addresses it uses for the rule.

Still, this group alias thing is a bit of a hack. You won’t be surprised to hear that the feature is not documented in Address Book’s Help feature. Here’s the list of topics under “groups” in Address Book’s Help:

Click a topic below.
Adding contacts to a group
Creating a group of contacts
Creating Smart Groups
Deleting a contact from a group
Deleting groups of contacts
Selecting which addresses to use for members of a group
Showing all groups a contact belongs to
Using the Note field
Viewing multiple contacts or groups

I don’t see anything about groups within groups here.

When I saw that Tiger’s Address Book featured “Smart Groups“, I thought that maybe this feature would help eliminate the need for a hierarchy of groups. After all, the “smart” features are based on Spotlight, and one of the key benefits of Spotlight is that you no longer have to keep your things neatly organized, because you can always use Spotlight to organize things on the fly based on certain criteria.

Well, that’s true — but it looks like Address Book’s Smart Groups lack one fundamental option that would help achieve this goal. And that’s the option to use “is in group XXX” as a criterion in the definition of a smart group!

You can create a smart group that automatically includes all cards whose first name is “Pierre” — but you cannot create a smart group that automatically includes all cards whose group begins with “Work“.

I don’t understand this restriction. In Mail itself, you can create a smart mailbox whose definition includes a reference to other existing smart mailboxes. In the Finder, you can create a smart folder whose definition includes a reference to other existing smart folders. But in Address Book you cannot even create a smart group whose definition includes a reference to an existing static group!

So much for being “smart”.

5 Responses to “Address Book Smart Groups: Not so smart”

  1. ssp says:

    What about adding information on the people’s workplace or project to the company or notes field in AB and making a smart group based on that?

    (It’s a shame that you can’t easily, i.e. in the Address Book Application, add your own fields to the address book, btw.)

    Of course Apple could have easily just supplied the groups with the metadata information to make it available for Spotlight. Why not file a bug report / feature request on that?

  2. scott.paulis says:

    Lamenting about this problem myself, I wrote an Apple Script to do just this.

    Here it is:

    — Multiple Contact Tagger
    — Select multiple contacts in Address Book, then run this script (via the script menu or Quicksilver are the best ways), and it will let you enter the tag (ex: [Family] ) you want and then apply it to the selected contacts by appending it into the Note section of each contact. You may then want to create Smart Groups that search for that tag in its criteria, and then Smart Folders in Mail that use the Smart Groups in its criteria
    — author: Scott Paulis
    — date: may 17, 2005

    tell application “Address Book”
    set thePeople to selection
    display dialog “What tag would you like to apply to the selected contacts?” buttons {“Cancel”, “Apply”} default button “Apply” default answer “[tag]”
    set dialogInfo to result

    set selectedButton to button returned of dialogInfo
    set tagString to text returned of dialogInfo

    if selectedButton is “Apply” then
    repeat with aPerson in thePeople
    set currentNote to the note of aPerson
    if currentNote is missing value then set currentNote to “”
    set newNote to currentNote & tagString
    set note of aPerson to newNote
    end repeat
    end if
    end tell

    Feel free to use this script for yourselves and improve it! If you do, please email me and let me know so I can benefit from your improvements as well!

  3. Pierre Igot says:

    Cool, thanks for the script. Using the “Note” field is still a hack, though.

    ssp: I almost always file bug reports / feature requests for the issues that I describe in this blog. It goes without saying :).

  4. Paul Ingraham says:

    As a reluctant Entourage user, I’ve been not holding my breath waiting to find out if Tiger’s AB is improved enough to justify making the transition to both Tiger and, finally, to Mail. Doesn’t sound like it. The limitation described here is right at the heart of what has always made the AB/Mail combo a non-starter for me. Mail can get as good as good can get and I still won’t use it if AB doesn’t shape up. Talk about a weak link the chain!

    Entourage annoys me routinely, but at least it has the feature firepower. I can’t even remotely afford to mess around with hacks like Scott worked up when Entourage does all of this and more with one hand tied behind its back.

  5. Pierre Igot says:

    Like I’ve said before, I am still waiting for a third-party developer to create a contact management tool based on the Address Book database that would really provide advanced features.

    That said, I suppose that there are probably a number of things that can be achieved with a combination of Spotlight and Automator…

Leave a Reply

Comments are closed.