Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Help! How can I import data from apple mac address book (vcards)??


This topic is 6362 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi - I'm a filemaker newbie!

At my office, we have downloaded a trial version of Filemaker pro 8.5, as we think it could be ideal for our contacts database.

Currently, all the contact data is held on apple mac's address book, which only seems to be exportable as vcards (rather than .txt etc).

Is there an easy way to import these records into Filemaker? .. I have read posts on here about 'data manipulation' shareware doing the trick, but am very confused about where to start!

thanks so much :-) (by the way, we are on Mac OS X.4.6)

Posted

I do not know if you really consider it easy, but the way I once implemented it was by the use of a global field and two calcfields and some applescripting, beware that plugins exists to make the same - but here's the guerilla warfare method:

First make the global field gTotalCount and make it present on the layout which is present at the time you execute the applescript.

The first calcfield is called "NumberOfDupes":

Int(Log(gTotalCount) / Log(2))

...then the next required calcfield, lets call it "NumberOfRemain":

gTotalCount-2^NumberOfDupes

Here comes the script, only including the 3 fieldnames in the solution I here deal with:

tell application "FileMaker Pro"

tell application "Address Book"

set aVar to count every person

set bVar to name of every person

set cVar to the value of email of every person

set dVar to {}

repeat with i from 1 to number of items in every person

set this_item to item i of every person

set eVar to value of phone of this_item

if eVar is {} then

set dVar to dVar & ""

else

set dVar to dVar & item 1 of eVar

end if

end repeat

end tell

show (create record)

set cell "gTotalCount" to aVar

repeat (cell "NumberOfDupes") times

duplicate every record

end repeat

set fVar to cell "NumberOfRemain"

set fVar to fVar as number

duplicate (records 1 thru fVar)

set field "theName" to bVar

set field "theEmail" to cVar

set field "thePhone" to dVar

end tell

The issue is that you grap each string of data from the records accoding to it's name in the addressbook, and then create enough records so you can write each string without truncation, since the distinction between set cell and set field does this, cell is only centered towards one record, while field puts each subpart in it's own record.

Now this is a method from the fm6 haydays, and there is an issue with my use of:

show (create record)

With the present version are you, to initiate your script by i native Show All Records followed by a Show Omitted, and then get rid of the show( statement. Since we then involve native scripting as well should the outer:

tell application "Filemaker Pro"

~

end tell

...be stripped of before embedding.

Today is this script employed in a marketing dept. where the staff in the morning makes a backup from the address book and deletes it entirely and begin to harvest vcards from the yellowpages. When a considerable yield is optained, is this script executed and the address book is restored back to the persons own again.

--sd

Posted

thank you so much for your help and time, but i'm afriad i can't follow that at all. I am much too much of a FM novice to even attempt to work it out :-(

Posted

Well you can try this template and see if it works with your data, then could we collaborate on getting the relevant fields in your addressbook into the template.

When it's done do you have a blackbox system to treat your raw data right for further importing into your own solution!

--sd

showit.zip

  • 4 weeks later...
Posted

In case anyone's interested - we ended up dragging and dropping all the vcards into Entourage, and then importing the file from there into FM. We used entourage as a 'middle man', which someone suggested. Not very straightforward, but we got there in the end!

  • 4 months later...
  • Newbies
Posted

This thread was VERY helpful as I had the exact need as the OP. (See! Some people really DO use the Search feature.)

I'm not in my wildest imagination a "developer" so racht's ultimate solution was the path I took [Address Book > Entourage > FMP 6.0].

About ten years ago I studied ALL the popular Contact Manager packages out there and found them all wanting. A buddy said, "Make your own, FM Pro is easy." Well, I wouldn't call it "easy" but I finally got a Contact Mgr that tracked what I wanted to track ... and ignored what I didn't want to track.

When I upgraded to OS X I could run FMP in "Classic" (OS 9) only. I didn't even think to upgrade FMP (Foolish oversight) so I struggled with a hodgepodge of using my Add Book, E-mail Client and iCal to (poorly) keep current with my projects, my contacts, my prospects.

[Oh yeah. I cannot stand MS' products (save for Power Point, a really fine application) so even though they were "packaged" with my G3 ... they were not worth the headaches of using them. (I tried Entourage. It stinks.)]

"Push" finally came to "Shove" and I embarked on this little adventure. Now that I have been able to upgrade to FMP v6 (a Free Trial) and actually use it in OS X I am confident about upgrading to 8.5 and being happily effective again.

Thank you, FM Fourms and FM Forum Members for this site and your help!

- KK

This topic is 6362 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.