meaning of the 'primary' attribute?

3 views
Skip to first unread message

Zindus Development

unread,
Aug 19, 2008, 5:06:35 PM8/19/08
to Google Contacts API
Hi -

I would like to ask what the 'primary' attribute is for, when it's
present and when it isn't?

Even though the 'primary' attribute is used throughout the Reference Guide:
http://code.google.com/apis/contacts/reference.html
there's no explanation of it.

The reason I ask is that I'd always inferred from the examples (and my
own testing) that if an <entry> contained a <gd:email> element that
exactly one <gd:email> element would have a 'primary' attribute.

But now I realise that some users' contacts don't have any 'primary'
attributes on any of their gd:email elements. So I'd like to clarify
what this attribute is for.

Thanks -

Leni.

DHager

unread,
Aug 19, 2008, 8:36:46 PM8/19/08
to Google Contacts API
I think it's just a way to designate the first-among-equals, although
I agree that the API would be clearer if when there was always one and
only one item marked primary, with the sole exception being where
there were no items. (e.g. no phone numbers at all.)

Trevor Johns

unread,
Aug 21, 2008, 7:52:19 PM8/21/08
to google-co...@googlegroups.com

The "primary" designation is used in the old GMail Contacts UI (click
on "Older Version" at the top of GMail to see this). The email address
that is marked primary will show up at the top of the contact display,
the others will display at the bottom. This is no longer relevant in
the new contacts UI.

DHager: The behavior you describe should be the current behavior. You
can either mark no addresses as primary (in which case nothing will
show up at the top of the old UI), or mark one address as primary. If
you try to mark more than one address as primary, you'll get an error.
If you're seeing otherwise, please let me know.

--
Trevor Johns

Trevor Johns

unread,
Aug 21, 2008, 8:57:41 PM8/21/08
to google-co...@googlegroups.com
On 8/21/08, Trevor Johns <tjo...@google.com> wrote:
> The "primary" designation is used in the old GMail Contacts UI (click
> on "Older Version" at the top of GMail to see this). The email address
> that is marked primary will show up at the top of the contact display,
> the others will display at the bottom. This is no longer relevant in
> the new contacts UI.

I've been informed that the "primary" attribute is also used by sync
clients that use the Contacts API, since other contact systems place
occasionally place importance on this attribute.

--
Trevor Johns

Reply all
Reply to author
Forward
0 new messages