i have a database called ‘thenewrecords’ with a single field ‘item’ and 6 records.
in the the database into which i want to import these records, ‘item’ is the second field.
when i run
importdatabase ‘thenewrecords’, ‘matchingfields’, 'yes’
or
openfile '++thenewrecords’
i get 6 new records with NO VALUES in the item field.
when i run
importdatabase 'thenewrecords’
or
openfile '+thenewrecords’
i get 6 new records with values in the first field, which is what you would expect.
I can confirm this. I also found that it would work correctly if I was matching fields and item was the first field in both databases. It would appear that the bug is in the part about order not being important. Both the order and the names must match in order for the import to work, when you specify matching fields.
I’ve done some additional testing, using a database with multiple fields, and it seems to be working correctly in that database.
I made a copy of a database with 11 fields, and added a twelfth field at the beginning, so that the eleven existing fields were all pushed over one. When I imported, and matched names, the first field was left empty, as it should have been, and the remaining fields were filled correctly. I then switched the order of two of the fields, and tried again, and once again it worked correctly.
It looks like the bug has something to do with the fact that you had only one field to import.
yesterday i did an
importdatabase ‘matchingfields’, 'yes’
i was importing 6 fields. one of them (coincidently, named ‘item’) would not import.
i ended up rearranging the fields to match the order in the receiving db and importing without matchingfields.
today, using the same 2 files, i couldn’t replicate the problem.
i even tried again with the fields in the wrong order, and the import with matchingfields still worked.
i don’t knw how far down your to do list this issue is, jim, but it’s still a problem for me.
today i tried an importdatabase with matchingfields.
six fields in the database being imported.
the first four imported; the last two were just skipped.
i had to rearrange the fields in the receiving database and do importdatabase without options.
It sounds like maybe you have found a new bug? The confirmed but that is in BitBucket only occurs when just one field is being imported. A problem with importing a single field seems like a low priority bug to me. If you’ve found a situation where it fails with multiple fields, please submit a .zip file with an example so that I can duplicate and work on the problem.