Francisco C. Otani:
Thank you for your post.
I am using FileMaker Pro 10.0v3 Advanced on an iMac running OS X 10.5.8.
I am unable to duplicate the problem. This is what I have done...
1. With FileMaker Pro 10.0v3 Advanced, I created a new database file using the Contacts Management template.
2. There is a relationship between the Contact Management and Notes tables based upon k_ID_Contact field.
3. I entered several records into Contact Management, and added notes.
4. I created a new script with the Import Records script step. I specified the same database file, selected the option "Update matching records in found set", and set the k_ID_Contact field in both tables to match. When I click OK, I'm presented with the auto-enter and repeating field options, and I click "Import". My script step now says:
Import Records [ "Contact Management.fp7" ; Update matching ; Mac Roman ]
Is this happening with all of your database files or just one? Any additional information you can provide may be helpful in narrowing down the possible causes.
So far, it occurred two times with different databases. I could not find any reason for that behavior, but I am used to reuse scripts by copying and pasting them between files, and then modifying the steps accordingly. With the Import Records step, particularly, I always change the "Specify data source" to point to the desired file. But I am not sure whether this could be a possible cause.
What it sounds like to me:
You cannot script an import using 'update and add to' if there are no records in the target table to begin with. You will need to add one record in the target table, create your script (which will THEN allow 'update and add to' and then delete the dummy record back out. And no, we shouldn't need to do that when creating an import using a script but that's what we need to do.
It just will not match the first record I import... it will create a second one and match that, and no more will be created, but then I have two of every record... Truly bizarre. If I find a workaround I will let you know. I suspect it may have to do with text types or some such strange thing - I'm matching by text based serial IDs like: AD0000001 etc
This does not make me a happy bunny, as it requires many hours dumping table contents (750k records across 4 different tables) and reimporting to try and get something working nice and cleanly without duplicate record creation.
Matching on text types shouldn't matter, even if one ID is number and the other is text (as long as the number field hasn't been changed to remove the leading zeros). It would be helpful to know: 1) What type of file are you importing from, ie, fp7, txt, csv, mer, 2) Are you remembering to Show All Records before your import? 3) Do you have field-level validation in the target table (on that serial number) which might cause problems? 4) I would be concerned about only changing the target source. Do you also go into the import map and make sure that a) you are on a layout matching the table occurrence target and b) make sure that the fields properly map to the target?
Your opening post points clearly to no records being in the target when you first try to import - it will always change it back to 'Add New Records' only. But it seems you have other issues as well.
thank you once again LaRetta, it was indeed Tom being stupid - mismatching import table/layout - I had wrong base table on import layout...