Jump to content

exporting 1 large field as a Ascii file with the extention .VCF


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

Recommended Posts

I have a large calculated field that creates a vCard for my contacts that I want to export in an ascii format file with the extension .VCF.

Basically if I copy and past in a text editor and save as text with .VCf it works. I would like to remove a few of those steps.

It looks like the xml may be the answer but I have no experience with it at all

Thanks

Edited by Guest
Link to comment
Share on other sites

A couple of methods. The basic problem is that Export Field Contents uses UTF-16, with no way to change it. This is all very well and future-oriented, but many (backward) applications do not yet understand it. First, you can just get a found set of only 1 record, then regular Export that.

A new window makes it easy to change the found set without messing up the current one. Lightweight method:

New Window

Show All Records

Omit Record

Show Omittted Only

Or you can use xml/xsl. But first I'd need to know what line endings you'd want, Mac old returns, Mac new line feeds, Windows return line feed. Also, why ASCII, why not UTF-8? If the receiving app will handle utf-8 it's a lot better than ASCII, especially if you have any high ASCII characters (accented, etc.).

Link to comment
Share on other sites

How about a seperate table with one field for your export?

A simple loop could create the records for export.

Using the middleValues function you could extract 1 line from the calculatedd field each time and write to a new record in the seperate export table. Once you reach the ValueCount of the calculated field exit the loop and export the generated Export file records. I think this should result in a file that is the same as copying and pasting into your text editor.

Link to comment
Share on other sites

The calculation is giving me the exact text I need (See example below) I need the returns and everything right where they are. I can not have any lines added. No commas. Nothing. I have tried all the exporting options Tab, comma and so on. I'm thinking the xml might work but have no idea where to begin with it.

Below is the text I'm copying from my one calculation field. I need it exported and/or saved as a text file with the .vcf extension to import it to addressbook or entourage.

Fenton - I can change the file output from utf-16 but that does not seem to work either. I may have been wrong with my ascii question. I really only need text

Thanks for your help

BEGIN:VCARD

VERSION:3.0

N:Ledbetter;Tom ;;Mr. & Mrs.;

FN:Mr. & Mrs. Tom & Theresa Ledbetter

ORG:RE/MAX Suburban Inc.;

TITLE:ePro Certified Internet Professional

EMAIL;type=INTERNET;type=home:[email protected]

EMAIL;type=INTERNET;type=work:[email protected]

TEL;type=Mobil:(586) 675-6751

TEL;type=Home:(586) 623-5522

TEL;type=Fax:(586) 477-4791

TEL;type=Work:(586) 262-2000

TEL;type=School:5 Not enough #'s

item2.ADR;type=WORK:;;;;;;

item3.ADR;type=HOME;type=pref:;;43599 Schoenherr;Sterling Heights;MI;48313;;

item3.X-ABADR:us

NOTE:

CATEGORIES:Agent

END:VCARD

Link to comment
Share on other sites

The calculation is giving me the exact text I need (See example below) I need the returns and everything right where they are. I can not have any lines added. No commas. Nothing. I have tried all the exporting options Tab, comma and so on.

I am able to get your Vcard text to import into my MS Outllok. I did the followng:

1) copied your text and pasted into a field within Filemaker.

2) Used Export Field Contents to create a "text" file.

3) Imported the "text" file into a new table with one field. This created a new record for each "line" of your original text.

4) Exported the records in the new table to a file named MyVcard.vcf (with the "Save as Type set to Tab-Seperated (*.tab).

5) Dragged and dropped the MyVcard.vcf into my contacts folder and it opened.

However, the above would require no Tabs be used in your original text.

Link to comment
Share on other sites

  • 6 years later...

Here is an example file I wrote for myself. It has several different file writing scripts, with XML/XSL, Shell, and vanilla AppleScript. The AppleScript and Shell would obviously only work on a Mac (as you first post implies). The xsl should work cross-platform.

Thank you, Fenton. I've been tearing my hair out for an hour to figure out how to export a list of addresses to paste into an email. If I'd given them CSV or Tab Text, the recipients would have freaked out. 

Link to comment
Share on other sites

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