Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 8363 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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

Posted

If you sort by serial number descending, the highest serial number is on the first record.

Posted

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"]

Posted

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

This topic is 8363 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.