droosan Posted November 30, 2001 Posted November 30, 2001 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 ]
Thom Posted November 30, 2001 Posted November 30, 2001 The 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"">"
droosan Posted November 30, 2001 Author Posted November 30, 2001 Thanks Thom, for the ideas on exporting AND for the "" tip. So you're saying (tacitly) that life doesn't get better in FM5.5?
Thom Posted November 30, 2001 Posted November 30, 2001 I'm not saying anything about FM 5.5; I don't have it yet.
droosan Posted November 30, 2001 Author Posted November 30, 2001 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.
Thom Posted November 30, 2001 Posted November 30, 2001 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.
The Bridge Posted November 30, 2001 Posted November 30, 2001 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
droosan Posted December 1, 2001 Author Posted December 1, 2001 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.
Recommended Posts
This topic is 8729 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 accountSign in
Already have an account? Sign in here.
Sign In Now