• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Synchronizing AddressBook to a FileMaker Database
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Synchronizing AddressBook to a FileMaker Database


  • Subject: Synchronizing AddressBook to a FileMaker Database
  • From: David Crowe <email@hidden>
  • Date: Fri, 17 Jun 2005 11:22:24 -0600

Title: Synchronizing AddressBook to a FileMaker Database
http://DavidCrowe.ca/AppleScript/SynchAddressBook.scpt.zip

... is a script that may be useful for people wanting to synchronize a contact list in a FileMaker database with the Address Book application.


Note that this script cannot be used as-is. It must be adapted with the database name and field names in your particular FileMaker database. To add more address book fields (most are supported already) more complex modifications would be required.

The main limitation is that Address Book allows multiple phone numbers or emails in a category (e.g. two work phone numbers). This is not supported, only the first will be used, and others may get deleted.

Synchronization is relatively simple. The script stores the date and time of the last synchronization, and uses the following logic:
  • Record modification date older than last synch. in both places: do nothing.
  • Record newer only in Address Book: Copy changed fields to database.
  • Record newer only in Database: Copy changed fields to Address Book.
  • Record newer in both places: Merge records by asking user about fields that have different values.


Speed is a problem for something like this. Synchronizing under normal circumstances takes about one minute for 1500 records, which is pretty good. However, a complete update (e.g. every record modified) took me an hour on an 800 MHz G4 TiBook. This would likely only be necessary the first time this is run.

Another software issue is that accessing fields in the AddressBook is by class, i.e. "first name" is a class and, as far as I know, can't be assigned to a variable. FileMaker is more flexible from this perspective.

So, in FileMaker you can do something like:
    set cell FieldName to TextString

with 'FieldName' being a variable set to a field name.

In AddressBook the code cannot be generalized like this, that makes it very verbose and awkward to modify. In other words, adding a new field would mean adding the field name to a list for FileMaker but, for AddressBook, would require adding some specific lines of code.


If anybody uses this code, feedback would be welcome.

- David Crowe
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: can't get version
  • Next by Date: "info for" always failing in Automator action script
  • Previous by thread: Re: can't get version
  • Next by thread: "info for" always failing in Automator action script
  • Index(es):
    • Date
    • Thread