February 23, 200223 yr I'm creating a runtime FM DB that has 5 auxillary files. I'm trying to plan for a future upgrade and want to script the process. Is it tough to do?
February 23, 200223 yr Yes, but not impossible. If you plan ahead you'll make it easier on yourself. Here's the basic algorithm for upgrading: 1. Make sure all the files in the old system are showing all records 2. Import the records from the old system to the new system 3. Update the serial numbers of the new system to coincide with what they were in the old system Obviously, steps 2 and 3 are the most difficult. Step 2 is only really difficult if you add fields or change the names of fields. If you try not to do this, then you can simply create an import script that imports using matching names. But if you change the name of a field, and that field isn't a calculation field or something else that doesn't need to worry about being imported, then you'll screw up the import process or have to do it manually. Step 3 is much simpler now that FileMaker has provided a Set Next Serial Number step. After the records have been imported into the new system you want to get the largest serial number that already exists. You do this easily by showing all records, sorting by the serial number in descending order, and noting what the serial number is. This assumes that your serial numbers are number fields and not text fields. If they are text fields you've got to do some other work to find the largest one. Once you know the largest serial number, then you just set the next serial value to that number plus one. I'm sure others will have some more tips. Chuck
February 25, 200223 yr Author I'm not quite sure how to sort the serial # list and then select the hgiest serial #,,,
February 25, 200223 yr If you sort by serial number descending, the highest serial number is on the first record.
February 26, 200223 yr Author To ensure my runtime upgrade reads and starts the users DB with the right unique_serial number I'm considering the following upgrade script. Show all Records Go to Record/Request/Page [Last} Set Next Serial Value ["unique_serial","uniques_serial + 1"]
February 26, 200223 yr I would recommend this instead: Show all Records Sort [ unique_serial, descending ] Set Next Serial Value ["unique_serial","uniques_serial + 1"] After the sort you should be on the first record of the found set. There's no need to go to the last record. Your other option is: Show all Records Sort [ unique_serial, ascending ] Go to Record/Request/Page [Last} Set Next Serial Value ["unique_serial","uniques_serial + 1"] But why do it that way when you can remove the superfluous Go to Record/Request/Page step by sorting in descending order instead? You need to sort somehow so that you can be sure that the highest value is either the first or last value. Chuck
February 26, 200223 yr Author Chuck I appreciate your perspective AND help! I'll follow your advise. Michael
Create an account or sign in to comment