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

Help with GetNextSerialValue or Set Next Serial Value

Featured Replies

Does anyone see anything bluntly wrong with this script? The two tables are related via a Constant.

If [ IsEmpty ( ddd_online::zContact_ID ) ]

Insert Calculated Result [ ddd_online::zContact_ID; GetNextSerialValue ( "trip_d" ; Contacts::Contact_ID) ]

[ Select ]

End If

I've trying to use this when importing records from another files. Is this not how you use the GetNextSerialValue?

I've also tried this as the script.

If [ IsEmpty ( ddd_online::zContact_ID ) ]

Set Next Serial Value [ ddd_online::zContact_ID; Contacts::Contact_ID ]

End If

TIA.

Insert Calculated Result [ ddd_online::zContact_ID; GetNextSerialValue ( "trip_d" ; Contacts::Contact_ID) ]

Try:

Insert Calculated Result [ ddd_online::zContact_ID; GetNextSerialValue ( "trip_d" ; "Contacts::Contact_ID") ]

The GetNextSerialValue() is an odd function, in the Design section, because it wants the field name in quotes. The reason for this (I think) is that it often would be used to get the value from a file which would did not have any kind of relationship from where you are; which you wouldn't if you were doing an automated update, which is what the function was designed for.

It would be nice if it would also accept unquoted values, because it's so easy to overlook. But that's really a very different thing.

I've trying to use this when importing records from another files. Is this not how you use the GetNextSerialValue?

I don't think so. If you're unable to auto-enter the serial numbers during import, you should use Replace Field Contents [serial numbers] to number the imported records. You can use Set Next Serial Value[] to preset the numbers either before or after the import, but in most situations you wouldn't need to.

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.