February 26, 200718 yr I ready to cry! I convinced the owners of my company to do online registration and now it's a mess! Web designer sends me this file (forms.csv) and I need to get it in FMP file, I can't send it. And I don't know how to change it to the needed formate... I'm so ready to cry! Is there a way to set the fields import, and how can I divide up the flat database to import into two files? Gratefully, Kim forms.txt
February 26, 200718 yr It looks like you have a tab-delimited file. Is it only 1 file? What do you mean by "Page1", "Page2", etc.? Is that what's actually in the file? Is there actually a blank line between the sections? These things matter a great deal to someone parsing the file; we have to see exactly what you get (the exact format anyway, sample data is fine). Are you processing this on a Mac? Because if so you could go through the file with AppleScript, and write each "section" to its own file. Then it's just 3 separate tab-delimted imports (or write the records directly with AppleScript, either way, not sure which is fastest, probably depends on the size of the files). Otherwise you could import the whole file into a FileMaker field (likely global), then loop through the lines, setting each value into its proper table and field. You have the Child_id. You do not have a Parent_id. This is not a big problem in this case. Are these always (always) new registrations? Or could one possibly conflict with an earlier record? In any case it would be good to capture the name of the file, so you don't accidentally import one twice. Also fairly easy with AppleScript. Or you can use FileMaker Import's "Matching records" option, or, if looping, test for existing.
February 26, 200718 yr Hi Kim, don't cry yet. Try the following manual steps: 1) File>Open 2) in the Files Of Type dropdown select Tab Seperated Text Files (*.tab, *.txt) 3) Select your forms.txt file 4) in the First Row Option dialog box select the Data radio button & Click OK. 5) Name your new FileMaker file and click save If you need further help in getting your file into a usable format see if the attached helps at all. z_forms_Converted.zip
February 26, 200718 yr Also, you said "csv", but your file is tab-separated. If it is only one file then one simple import is not going to work, as the columns (fields) are not the same.
February 26, 200718 yr Here's a zipped excel file. Download the file and unzip it. Then in FM Just click File>Import Records>file and map the fields. I broke down the spreadsheet in to Table 1, Table 2, Table 3. So match the tables to your current table and import. Check off "Do not import first record." HTH forms.zip
February 26, 200718 yr Also, you said "csv", but your file is tab-separated. If it is only one file then one simple import is not going to work, as the columns (fields) are not the same. I'm not sure if that is directed at me or the original poster??? I too noticed the file was Tab seperated not COmma Separted and that is what I used in my example file. The script I attached would find the Page2 records and export them to there own tab seperated file as attached. Since the file contains the column headings the new text file should be able to be mapped to the final Page2 data file(with first row contains field names). Yes, it would require a few export files and more importing but it could all be scripted. Page2.txt
Create an account or sign in to comment