James Gill Posted September 2, 2011 Posted September 2, 2011 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?
comment Posted September 2, 2011 Posted September 2, 2011 Why is it necessary to replace the existing values?
Raybaudi Posted September 2, 2011 Posted September 2, 2011 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
James Gill Posted September 2, 2011 Author Posted September 2, 2011 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!
Vaughan Posted September 2, 2011 Posted September 2, 2011 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. :(
bcooney Posted September 3, 2011 Posted September 3, 2011 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.
Recommended Posts
This topic is 4888 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now