Jump to content

Vcard plug in


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

Recommended Posts

Colin:

Have a look at FileMaker Business Tracker, which has an "export vCard" script, which you can make use of, no plug-in required. You can download it from FMI's website.

-Stanley

Link to comment
Share on other sites

  • 3 weeks later...

Bug with Carriage Return in vCard

Get the example from FileMaker here Business Tracker.

A very interesing example indeed.

1) Exporting a global field containing the XML file.

2) Using the XML file to create the Vcard

3) Using an export to delete the new created XML file.

I noticed that when a Carriage Return is used in any of the fields. Most likely the Note field. The vCard will not be accepted by AddressBook.

At the moment I use the substitute "¶" for " " (spaces) to remove the CR.

But it would be nicer to be able to use CRs.

If somebody has a better idea, I'm really interested.

I also noticed that when I create a vCard from AddressBook, anything from the note field isn't placed in the vCard. Strange I'd say, or is it me?

There might be two ways of getting it to work

1) using the XML file:

note:





2) using the substitute in FM.



Perhaps this helps someone:




   CHAR= %x01-7F; Any C0 Controls and Basic Latin, excluding NULL from; Code Charts, pages 7-6 through 7-9 in [uNICODE]



   CR= %x0D; Carriage Return

   LF= %0A; Line Feed

   CRLF= CR LF; Internet standard newline

Ryo Sode, the creator of the XML file is aware of the problem but doesn't have a solution for it. He doesn't work with FM anymore.

Curious if this can be solved.

Link to comment
Share on other sites

AppleScript supports the note of a person in Address Book. The following will find a person and set their multi-line note. I'm not saying it's fast, but it works. The name must be unique however, as you have no other way to find the person (unless you used AppleScript to create the Address Book entry, in which case you could have gotten their unique AB id).

Apparently AppleScript or Address Book converts the FileMaker field carriage returns transparently. I originally translated them with an AppleScript find/replace routine. But then I tried it without, and it still worked!

tell application "FileMaker Pro"

set theName to cell "FirstLast" of current record

set theNote to cell "Notes" of current record

end tell

tell application "Address Book"

set theEntry to first person whose name is theName

set the note of theEntry to theNote

save addressbook

end tell

 

Edited by Guest
fixed the error "fixedNote"
Link to comment
Share on other sites

I prefer not to use AppleScript. If that is possible at least.

The idea here is to create a vCard.vcf file.

Using this VCF export trick.

Hint: remove the spaces after end:vcard creating [color:black]end:vcard to solve the AddressBook error.

There should be no need to use AddressBook yet. If there is a duplicate card then AddressBook will report this when opening the created vCard file.

So I'm still in the need of creating a substitute for the Carriage Return that works in AddressBook.

Anyway, the variable 'fixedNote' is not defined and "the note' should be 'theNote'?

Thanks for thinking along.

story continues..

Edited by Guest
Link to comment
Share on other sites

This topic is 6812 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.