September 2, 201114 yr I am currently working with a solution that was developed on a previous version of FMP. Some of the primary key fields in this solution have been set using the Get ( RecordID ) command and I'm trying to think of the best way to fix this. About the only way that I can think of is to capture the original primary key and then generate a new key using either a serial number or a UUID function and then find every related record in every table across the solution and replace the original key with the newly generated one. This seems a laborious task at best. Am I missing something or is this realistically the only way to fix this issue?
September 2, 201114 yr I'm trying to think of the best way to fix this. You could: 1) Show all records in table view 2) Order by the primary key ( descending ) 3) See the hightest ID ( for examle: 25128 ) 4) Go to manage database 5) Change the definition of the primary key from calculated to auto-enter serial starting from 25129
September 2, 201114 yr Author Why is it necessary to replace the existing values? Hah, you're so right. I forgot I can just switch the field type and retain existing values. Ignore this thread!
September 2, 201114 yr Some of the primary key fields in this solution have been set using the Get ( RecordID ) Yeah I've seen a couple of solutions done like that. Must have seemed like a good idea at the time... to those that didn't understand how the record ids worked. A disaster waiting to happen. :(
September 3, 201114 yr Well, you have to admit that the function's name seems as if it's the appropriate thing to do. In fact, FM Help does not even provide a warning.
Create an account or sign in to comment