Newbies LabMonkey Posted December 11, 2006 Newbies Posted December 11, 2006 Is it possible to export a repeating field in a record to a text file with carriage returns separating each entry? I have tried all of the export options that come with Filemaker Pro 8.0, but none of them can generate this format. They are all based on other formats, and even the .txt export can essentially only do a comma or tab delimited format. What I have is a layout consisting of a field with a two line text header and a list and a repeating field of 96 samples. I need this exported to a text file in a format using carriage returns so that it looks like this: LX100IS Patient List [Accession#, Dilution Factor] 00000001 00000002 00000003 00000004 ....and so on Is something like this actually feasible using perhaps a script in Filemaker or do I need to be looking at other database options? Any help is greatly appreciated.
Newbies microcars Posted January 28, 2007 Newbies Posted January 28, 2007 I had to do something similar to this recently, but I needed to insert a Carriage Return after a certain Field so that when I converted the Tab Text file for printing, each record would take up 2 LINES for printing. I ended up exporting out of FM as Tab Text. Then I used Text Wrangler to show invisibles. Then I did a Find/Replace on the Repeating Field word AND the TAB character, changed to a Carriage Return and the Repeating word and *voila* it all worked. You should be able to do this by using Text Wrangler or a Windows Equivilent (I don't think WORD will work...) and once you have your Tab Text File, do a Find/Replace on all TAB characters and change them to Carriage Returns. If you have Field Names in the File, you can do another Find/Replace and search on those Field names and convert them back to TABs so they format properly.
sbg2 Posted January 29, 2007 Posted January 29, 2007 Set or calculate 1 field that looks the way you want your export then use export field contents. This will export with a character between each line similar to what is shown below. It's not a carriage return but will import back into FMP (and some other programs) as if it were a carriage return. *note this forum interprets the character as a CR so I substituted the pipe character. LX100IS Patient List|[Accession#, Dilution Factor]|001|002|003 After you import the file into a new FMP file you can export and end up with a text file as such: LX100IS Patient List [Accession#, Dilution Factor] 001 002 003 You can also put tabs between fields by using the keystrokes Ctrl-Tab between quotes in your calculation.
Newbies lmaury Posted January 29, 2007 Newbies Posted January 29, 2007 Hi, There's another way, but it involves getting a plugin called yooShell, which allows you access to the operating system. I know UNIX, so this is how you'd do it on a Mac or on Linux. yooShell_exec("echo "" & field_you_want & "" | tr '035' '015'; ") The funny character in the repeating field is 035 in octal. 015 is octal for the carriage return. If you run the "tr '035' ''015' on the data before importing it, that might also work. I believe DOS has a similar command. or there might be a way to do it in Perl. Best, lmaury
Fenton Posted January 29, 2007 Posted January 29, 2007 This would also be possible to do with Export XML, with a fairly simple xsl stylesheet.
Recommended Posts
This topic is 6508 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