July 30, 200421 yr So, I'm having some problems with autoenter serials that are supposed to be unique I've tried setting them to include index and i've set strict with do not allow over-rides and turn on indexing. The problem is i'm getting duplicate keys. I'll blank the database of records, reset all the serials to start at 1, then import a users records to the updated database. But it'll start making new records with duplicate keys that are supposed to be unique? Is this a known issue or am i barking up the wrong tree here. Thanks for any information you can provide!
July 30, 200421 yr When you import the records DO NOT import the data from the consecutive number field, click that field off. If you have it set to import the serial number it will import it regardless of whether it's unique and not perform the auto-enter. If you do not import that field it will auto-enter the serial numbers as you expect. When you import that field you're telling the system to give precedence to the existing data in the imported file and you're over-riding your field preferences. Phil
July 30, 200421 yr Author So, serial number and unique dosn't work at record creation? The problem with not importing the serial id's is that i'm working form a multi file solution, that uses the serial id's as foreign key's in other files. So skiping pre exhisting serial id's on import... will break relations to other files. I'm trying to get away from having to see the serial value of the last record in each file and update the serial id to start at the next record after importing new records.
July 30, 200421 yr See my article on PrimaryID key fields for unique IDs every time. It basically is an auto-entered calc instead of the auto-entered serial number. http://www.fmforums.com/threads/showflat.php?Cat=0&Number=100135&page=0&vc=1#Post100135
Create an account or sign in to comment