Jump to content

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

Recommended Posts

Posted

Specific Question:

In FM4.1, how can I produce html style line breaks within a calculation?

I am using FM to produce static html pages. I use a text calculation to html-ify the data I need from each record. I would like line breaks (and indenting) within the html.

If I put the paragraph symbol thingy in the text within the calculation:

1) If then, in browse I copy the html calculation field and paste into bbedit, things work properly. (I suspect bbedit converts the line break characters during the paste.)

2) However if I export the file to text, and then open the file in bbedit or a browser, between records I get proper line breaks but where I put the paragraph symbol thingy within the calculation I get the unrecognised character symbol.

I imagine this is due to the fact the mac, pc, and html(unix) all use different arrangments of r's and n's to denote a line break. I forget who uses what.

What I would simply like to do is to get calculation to output the same line break character that FM places between records in a tab separated export.

General Question:

Does FM5.5 have better facilities for generating STATIC html? (I am considering upgrading but since FM5 and FM4 are not compatible I'd have to upgrade all machines and that gets expensive and time consuming.)

For example, now, to get a calculation to produce text like:

<br clear="all">

I have to put

"<br clear=" & q & "all" & q & ">"

into the calculation, where q is a global with the value ".

Is there any easier way?

Any help would be much appreciated.

[ November 30, 2001: Message edited by: Drew Cover ]

[ November 30, 2001: Message edited by: Drew Cover ]

Posted

The par.gif symbol in FileMaker becomes ASCII 11 when exported. FM can't use true line breaks within fields, because the line break character is a record delimiter. Two approaches to work around this are 1) search and replace the exported file; 2) make a file to hold each line in a separate record, then export all the records in tab-delimited format. This is handled by a script. It's a bit slower, but it works.

To put quotes into a calc, double them up:

"<br clear=""all"">"

Posted

Thanks again, Thom.

You wouldn't happen to know of any way I could export the contents of a single text calculation field as a text file, preferably named according to another field in the same record.

What I would like to be able to do is to turn each record of a database into an html file.

I thought of a script which would "find" each record in turn, omitting the others, and export the found set. The problem is the filename. The "export" script step requires the filename to either be entered or restored, meaning the file from one record would overwrite the file saved from the last record.

Posted

Depends you your platform. In Windows you can set up the export to go to the same file every time. You can then use Send Message to copy or rename the file via the command line. On the Mac you can use AppleScript. I think there are also some plug-ins that may make this a bit easier.

Posted

quote:

Originally posted by Thom:

I think there are also some plug-ins that may make this a bit easier.

I highly recommend the Troi File Plug-in for this sort of thing. I do believe it is both cross-platform and available for FMP 4. This plug-in gives you a lot of control over files, including saving records as files, renaming files, etc.

Go to www.troi.com for more info

Posted

Another good idea Thom!

Do you know how to rename a file with AppleScript?

I know next to nothing about AppleScript. I opened the script editor and opened the Finder's dictionary. There are lots of commands there: open, quit, close, move, duplicate,.... but no rename.

Thanks again.

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