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

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

Recommended Posts

Posted

Im exporting a single calc field which has info needed for an .ics ical file.

Unfortunately I cant work out how to keep the returns so the resulting file info is on its own line.

as below

BEGIN:VCALENDAR

VERSION:2.0

METHOD:PUBLISH

BEGIN:VEVENT

DTSTART;VALUE=DATE:20070109

DTEND;VALUE=DATE:20070111

SUMMARY:event two2

END:VEVENT

BEGIN:VEVENT

DTSTART;VALUE=DATE:20070108

DTEND;VALUE=DATE:20070109

SUMMARY:event day

END:VEVENT

END:VCALENDAR

I end up with the resulting lines running together. The calc export field has all the returns.

thanks in advance

Posted

No just rewrite the scripts using a global field instead for the storage of errors - Like the attached snappies!

--sd

Billede_1.jpg

Billede_2.jpg

Posted

Thanks I found that option after posting. Unfortunately it does something to the file so ical wont read it. Interestingly if I copy the field and paste into a text file it does work.

Posted (edited)

It's probably the fact that FileMaker Export Field Contents outputs UTF-16 encoding, which some apps have trouble reading. Since you're on a Mac you could use AppleScript and shell script to write the field to a file instead; the default encoding is utf-8, which apps are happy with. Without getting too fancy as to the file location, this will write the field to a file on the Desktop. Run it in a Perform AppleScript step. The fields need to be on the current layout for this simple form:

copy cell "filename" of current record to fileName

copy cell "Text_" of current record to exportMe

do shell script "echo -n " & quoted form of exportMe & " > ~/desktop/" & quoted form of fileName

-- -n prevents a final line feed from being added




Alternatively you could use an XML export, with an XSL stylesheet. You'd need a found set of 1 for this, as it's a regular Export.




<?xml version="1.0" encoding="utf-8"?>



xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm" >

	

	

		

	

Edited by Guest
xsl added
Posted

In Unix command line things (commands, parameters, etc.) are typically separated only by a space. So data, which often contains spaces, needs to be protected, enclosed with single quotes, and any special characters escaped. That's what "quoted form of" does.

Posted

Alternatively you could use an XML export, with an XSL stylesheet. You'd need a found set of 1 for this, as it's a regular Export.

I am missing a piece here: if you have a found set of 1, couldn't you export it as tab-separated text, and specify UTF-8? I mean why bother with the XSLT?

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