bhag Posted June 2, 2005 Posted June 2, 2005 Is there any way that I can import a .txt file without creating a new record for each line. I would like for certain lines to be to be imported into certain fields of a single record. I am using this to try and get select lines of an email form into filemaker. Thanks
QuinTech Posted June 2, 2005 Posted June 2, 2005 The Troi File plug-in gives you the function "GetContents", which will put the entire contents of a file into one field. That would be the easiest way. The only other method I can think of is to import to multiple records, then use a loop to append everything into one record and delete the now-redundant records. Something like: Loop Set Field [global1, "contents1"] If ( Get ( CurrentFoundCount ) <> 1) ) Delete Record End If Exit Loop If ( Get ( CurrentFoundCount ) = 1) ) End Loop That's just off the top of my head, there may be flaws I haven't anticipated. J
Lee Smith Posted June 2, 2005 Posted June 2, 2005 OR Strip (parse) out the returns in a Text Editor before you import it. Since the file is a Text File already, you can use one of the Free (or Shareware) Text Editors that have Grep Pattern Find and Replace abilities and simply change the text file to import properly. Since you didn't attach a sample of the text that you working with, I can't be more specific. This recent thread Click Here suggests a couple of Text Editors for both platforms, there are others. Also, this topic comes up a lot. Do a search for [color:"blue"] Parse, Extract, Parsing, etc. with the the Username search described as Lee Smith and it should provide you with a lot of information. I just did this search: Search = [color:"blue"] All Forums Keywords = [color:"blue"] TextWrangler (one of the editors available for Mac) Weeks = [color:"blue"] 0 and it return quite a few. HTH Lee
sbg2 Posted June 2, 2005 Posted June 2, 2005 OR Import .txt file to a temp table with one field (MyTextField) and create a Value List (VL_AllText) that uses values from the MyTextField. Use a global calculation field = ValueListItems (Get(FileName) ; "VL_AllText" ) If you do not want the information sorted alphabetically add an Auto-Enter Serial field and use the Auto-Serial field for the second field in the value list (sort on the second field). that will keep the sort order the same as in the original text.
Fenton Posted June 2, 2005 Posted June 2, 2005 OR Put the text file(s) in a folder, then Import Folder, with Text files checked. OR Use the POP3it or MondoMail plug-ins to receive the email directly into FileMaker. (If any of you reading are on a Mac you could just use AppleScript, but an email plug-in is the best solution for lots of email forms to a dedicated address.)
bhag Posted June 4, 2005 Author Posted June 4, 2005 I have not had much success getting any of these methods to do exactly what I need. The problem is I do not need all of the information. I have attached a sample text file to show you what kind of data I am working with. I only need the information following each colon. Thanks for any help bandPostSample.txt
Recommended Posts
This topic is 7113 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