September 17, 200520 yr Hello, I'm trying to create a .txt file from a single global field in FM Advanced v8. I have entered a simple list into the field like this: This is line 1 This is line 2 This is line 3 etc... If I place my cursor in the global field and choose Export Field Contents, the resulting .txt file looks something like this: This is line 1[]This is line 2[]This is line 3[]etc... For clarification I entered square brackets [] in the sample above where there is an unknown rectangular character contained in the output. What I am after is a .txt file that looks just like the contents of my global field. Anybody know how to solve this dilemma?
September 17, 200520 yr I have the same problem!! Especially annoying when exporting to csv and it's not a searchable character to simply be able to search and replace with line break The only way i've got around it is to use an export field which uses substitute "p" with another symbol that's searchable so I can atleast do a search and replace with line break. Anyone else got ideas?
September 17, 200520 yr Author What I'm experimenting with now is having FileMaker replace all "¶" with a "~" before doing the export. Then I'm planning on writing a vbscript that will open the file and replace all "~" with chr(13) + chr(10) before re-saving the file. I think this will work but it seems like a lot of goofing around to accomplish a simple task.
September 17, 200520 yr There are various ways to accomplish this. One of the more common methods is to use one of the file plug-ins (eg Troi File) to remotely replace all the [] characters (ascii char#013) in the exported file. However that is by no means the only method. Another one involves the use of a utility table and a scripted export. It takes a moment or two to set up, but has the advantage of being entirely native and seamlessly x-plat. I'm attaching a quick example of ths latter technique in action. :) CR_export.zip
September 17, 200520 yr You can write a script to breakout the field into separate records into another table, then export this table. Is is one field, one record, or multiple? If it's multiple you can put an extra blank (or a description) record in between each separate set of information as a spacer.
September 19, 200520 yr Author Ray & Bass, I see what you are suggesting. Because FileMaker inserts hard carriage returns while exporting individual RECORDS, your suggestion is to split the single field value containing soft returns into individual records in a temporary table and then export the entire SET OF RECORDS to a .txt file. This will work for me. Thank you for your help!
Create an account or sign in to comment