michele Posted January 2, 2006 Posted January 2, 2006 Hi, I've been browsing this part of the forum but haven't found an answer to my problem. Is there an ultimate solution for importing from a csv file in filemaker 6. I'm talking about several files with a whole lot of fields (+90) that are being imported and have to be assigned to the right field in a database with +300 fields. The field names aren't similar. Of course I've done imports before but never for this amount of fields. Now I'm going crazy writing my import script using the filemaker import window, searching, scrolling up and down, trying to remember where I found a field and when I find it back wondering where the other field stayed... and when there's a mistake redoing the import etc. Guess some of you must be familiar with the problem. Been using little tricks like finding a 'spot' on my screen which serves as a guide to move up and down the field list, trying to search and match all these fields. It's horrible. So maybe you've figured out a great trick to do such large imports that make it a little easier. I don't care how crazy it is. Using markers on your screen or whatever...just need some helpfull tips. Version 8 just arrived last week, I know the importing is supposed to be much easier, but for now I'm stuck with this 6 problem. Thanks for posting your suggestion.
Fenton Posted January 2, 2006 Posted January 2, 2006 I think we need more info. You say "The field names aren't similar." Does the csv file have a header row with field names? But they are different in the different files? How about the order of the fields? Are they the same in all the files? When there alot of fields involved, my usual approach is to rename the fields (columns) so they match. It may actually take a little longer, but it makes "Matching names" work. One trick to dealing with the darn Import dialog is to use the Command-Arrow keys to move a field (column) up or down, instead of the almost uncontrollable dragging.
michele Posted January 2, 2006 Author Posted January 2, 2006 Dear Fenton, I could add header rows but the field names aren't similar to the names of the fields I import to. I could rename, a lot of work and then I'd have to export as another kind of file as csv I gues The order of the fields also differs. Thanks for the tip about command-arrow I'll try it. Thank you too for using 'darn' refering to the import dialog, it reliefs me -) If anybody has other suggestions go ahead
Fenton Posted January 2, 2006 Posted January 2, 2006 "Darn" is a euphemism in this case, especially when you cannot control scrolling speed (it is much better in 7/8, when you can make the dialog taller). Another suggestion would be to create another file to pre-process the imports, with only the fields you need. Perhaps even several files, each with only the fields needed for one particular import (if they are very different). Kind of a mess, but easier to deal with than 300 fields. For the 1st import, to set the order, you could name the fields according to the csv columns. In fact you can create these files FROM the csv file(s). The way to do that is to change the 1st line, with the column names, to a Merge type formal, that is, without the quotes and spaces after the commas.* Example: animal,vegetable,mineral "dog", "cucumber", "quartz" "cat", "green onion", "gold" Open such a file with FileMaker, choosing the Merge type. (You can leave the extension as .csv, on a Mac anyway.) It will create a FileMaker file, with named fields. You can then rename the field names to match those of your main file, so you can use "Matching names". Then Import successfully, and immediately create a script with the Import step to save the order. From then on you should be set, for that file anyway. You might want to save a "translation" table somewhere, of which column matches which field. I've done this in another little FileMaker file, in cases where I had to match field names of an old file to a newer file with different names. This is just a reference file, but very handy when things get confusing. *This is easy to do with a text editor, such as BBEdit or TextWrangler (free). It has a Find/Replace with an option to "Search selection only".
michele Posted January 3, 2006 Author Posted January 3, 2006 The import and translation table sound like good ideas. Gonna give it a shot. Thanks.
Recommended Posts
This topic is 6900 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