kyle Posted January 5, 2003 Posted January 5, 2003 hi all ! when i update old file with new one, if i import the old data to the clone of the updated file, people said i have to update the auto enter serial number. how is this a problem and what should i do to solve this problem ? and i heard i can solve this problem with fmp 5.5's get next serial number feature. if it is , can somebody show me the way ? so basically i like to know why this become a problem and how i can solve this problem on fmp5.0 and fmp 5.5. Thanks, kyle
BobWeaver Posted January 5, 2003 Posted January 5, 2003 Suppose the users' working file has 20,000 records in it and hence the last serial number is 20,000. The copy that you have been modifying has only 10,000 records in it. When you deploy the new version, you delete the 10,000 records from your modified copy and import the 20,000 records from the users' file into it. But, the next serial number will be 10,001 unless you reset it. If you don't, and a user creates a new record, you will start getting duplicate serial numbers. To avoid this, create a script that finds the maximum value of the serial number field, and then uses the Set Serial Number step to set the next serial number to that value plus 1.
jasonwood Posted January 5, 2003 Posted January 5, 2003 Would this be a step you would recommend always putting in the startup script?
kyle Posted January 5, 2003 Author Posted January 5, 2003 thanks, bob ! i got it. i just like to confirm that that is the only problem. is it ? jason, i think it is not necessary to put this script step on a start up script. i would put it in a update master script which contains the import script. regards, kyle
CobaltSky Posted January 5, 2003 Posted January 5, 2003 Hi Jason, As Kyle says, its value in a start-up script would be limited - though if you were expecting to update the file and forget to run a set-serial script, then it might be a failsafe/damage-control mechanism of sorts, I guess. However there is sometimes value in including the procedure in a 'Delete record' script, so that if users erroneously create a new record, then delete it, non-contiguity of the serial sequence does not result. Similarly, files which have a closing script which locates and purges any empty records (a feature sometimes found in files designed for use by novice users - eg in junior schools etc), can benefit from a set-serial sequence on the tail end of their exit script.
Recommended Posts
This topic is 8063 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