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.

getnextserialvalue()

Featured Replies

Could someone give me an explanation of how to use GetNextSerialValue()

Whatt Im doing is:

I Have a number field which is auto enter serial number

A global number field

a script which is

set field global number GetNextSerialValue ( Get ( FileName ); test_table::serial number)

what am i doing wrong or what is supposed to happen when i run this script

Thanks Stu

This process should return the next serial number in line to the global field.

Let me outline the criteria for this to work as intended in my example to follow:

Table Name = "TestTable"

Global field name = "gNextSerial" (Options = Storage: Global Field)

Number filed name = "SerialNbrID" (Options= AutoEnter: Serial Number)

In a script use the following:

SetField [TestTable::gNextSerial] , [GetNextSerialValue ( "TestTable" ; "SerialNbrID" )]

Please note that the name of the table and the field used in the GetnextSerialValue function are separated from one another by the semicolon, and their names are in "quotes".

The quotes are necessary so that the filemaker knows if it should treat the table and field names literally.

If you fail to use quotes, FileMaker assumes you are attempting to build the content dynamically and as a result will attempt to refer to the stored content of the two different fields that you named to build the destination.

New Example:

field name: tempdata01 = "TestTable"

field name: tempdata02 = "SerialNbrID"

So using the above two fields you could construct the same statement by ommiting the quotes:

GetNextSerialValue ( tempdata01 ; tempdata02 )

The statement above would evaluate to:

GetNextSerialValue ( "TestTable" ; "SerialNbrID" )

Clear as mud? smile.gif

  • Author

Thanks much I appreciate the help

Stu

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.