AnsweredAssumed Answered

Problem with auto-enter serials when importing into (empty) clone

Question asked by smashingly on Jul 26, 2010
Latest reply on Jul 29, 2010 by philmodjunk


Problem with auto-enter serials when importing into (empty) clone



I've tried to find an answer on the forums but wasn't able to, so hopefully this hasn't been covered elsewhere already.

I have a client for whom I developed a FMP database.  It's a single-user DB, so for any updating or adding of new functionality, I work on a copy myself, then when it's time to update him, he FTPs his DB to me, I import his data into my updated DB, then email him a link for him to FTP the new database.

This recently fell apart a bit, when he had added a significant number of records to one of the tables, which has a primary key PersonID which is an auto-enter serial.  I imported his records into my empty clone, but then we started getting "non-unique value" type errors.  Upon investigation I quickly saw in Manage Database that the PersonID field was set to a "next value" that was lower than the highest PersonID number.  Creating a new record in the Person table was therefore trying to auto-enter a serial number that already existed.

Can anyone tell me why this is happening?  I don't really want to tick the import box which tells FMP to perform auto-enter operations, because won't that completely renumber the PersonID values as they're imported, thus screwing up all my join tables and other relationships using the PersonID as a foreign key???  My current workaround is simply to look at the max ID number in each table and manually tweak the auto-enter serial's "Next value" field.  Bit of a pain!

Any ideas would be muchly appreciated!  I'm using Filemaker Pro Advanced 11 (latest updates as of 24 Jul 2010) under Mac OS X 10.6.4.