Ted S Posted September 17, 2005 Posted September 17, 2005 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?
kiwiora Posted September 17, 2005 Posted September 17, 2005 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?
Ted S Posted September 17, 2005 Author Posted September 17, 2005 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.
CobaltSky Posted September 17, 2005 Posted September 17, 2005 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
onthebass Posted September 17, 2005 Posted September 17, 2005 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.
Ted S Posted September 19, 2005 Author Posted September 19, 2005 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!
Recommended Posts
This topic is 7005 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