Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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?

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

  • Author

I'm not quite sure how to sort the serial # list and then select the hgiest serial #,,,

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

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

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

  • Author

Chuck

I appreciate your perspective AND help!

I'll follow your advise.

Michael

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.