Importing Records - Conflict with Record ID
I hope this makes sense....
I have a database which has a number of portals and have been using the database for some time. I have now created a newer version of the database and have written a script that will delete current records in the new database and then import all records from the old version, along with all the portal data. The integrity of the main records and portal data is therefore maintained by importing the Records_ID for the main records and each portal.
I have set the Record_ID for each any new record in the new database to be calculated as: Get(RecordID) +1, instead of automatically generated on entry. This is the only way I can avoid having old records with their old Record_ID values not conflict with new records when added. The conflict occurs if the newer generated Record_ID is lower than the Records_ID of the last imported record, I will eventually edit or overwrite the older record when I reach that same value... Example: I have imported 100 records from the old versions, the last imported Record_ID is 100, and the next Record_ID generated in the new version is 20.
The other way around, having the newer generated Record_ID higher then the last imported record does not cause issues, but it is a pain. Example: I import 100 records from the old version and the next Record_ID generated in the new version is 200 because (because of the amount of testing I have completed on the new database).
Not importing Record_ID will result in loosing all links to the portal data, and resetting the Record_ID will a conflict.
Is there any way of having the next Record_ID generated, taken from the last Record_ID? Or, am I doing it all wrong.
Or perhaps the Record_ID is just a number and having the separation as long as there is no eventual conflict.