Do one import for each table. During each import you should be able specify which fields get copied to the current target table. What this does is split the data from your csv file into several related FMP tables which is what you want correct?
Thanks a lot for reply
the problem is the tables have relations. for example I have tables (Company and Contacts). primary key for (Company0 is foregn key for (Contacts).
Is there any way I can create a loop first put fields from csv file into Company fields and take the CompanyID put it in Contact table as foreign key and the put the fields from csv file into contacts fields
And this Key value is not in your csv file? If it is then my previous approach works. If not, then this will take some more work.
If the key values aren't in your CSV, I suggest importing into a intermediate table where you can add in the necessary values. Scripts, replace, calculation fields are all possible methods, depending on what these key values are and how you go about generating them.
Once you've done this you can either use import records (this requires that your intermediate table reside in a seperate file) or you can use a script that loops through your set of imported records and uses set field to copy the data over one field at a time.