Skip 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.

Set Next Serial Value - Does not work with MAX function

Featured Replies

I am importing data to a revised solution. Whilst doing this I'm also converting all the relationship keys to strictly numeric, whereas the first version had text/number combo - so I'm just going to use the number part.

After import a re-assign the serial fields with a GetAsNumber to strip the text and use a proper number. The last step, to reset the next serial value:

Set Next Serial Value (serial-id; Max (serial_id) + 1)

does not work.

In fact it persists in returning the serial_id + 1 of the CURRENT RECORD. The workaround is to go to the last record of course (as shown in the help system) but the syntax for the calc is correct - FMP just won't do it.

I checked this in FMP 9, no joy. Is this a BUG?

the syntax for the calc is correct

Not really. Max ( field ) refers to the field in the current record only. So it doesn't actually do anything - unless that field is a repeating field.

If you had a relationship (for example a self-join using the x operator), you could use Max ( related::field ). That would look at the entire related set. What you really want is to aggregate the found set, but only summary fields do that.

There are some semantics here - "only" ... what about repeating fields or a list of fields in the same table?

--sd

  • Author

Thanks guys. I had over interpreted the description from the help system - you are of course correct.

Why did gdurniak delete his post?

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.