Syntax: GetNextSerialValue ( fileName; fieldName )
fileNameA string or text expression that represents the name of an open file.
fieldNameA string or text expression that represents the name of the field for which to return results.
Data type returned: Text
Returns the next value for a field defined to auto-enter a serialized value.
It's good practice to use the TableOccurrence::FieldName syntax to reference the field in this formula so that it can be evaluated in any context. Without explicitly naming a table occurrence, this function assumes the field can be found in the current context, which may not be the case. Because the auto-entered serial number is defined at the table level, it doesn't matter which of a table's occurrences you reference, as they will all return the same result.
GetNextSerialValue ("Invoices"; "InvoiceID")
Might return 5435.
GetNextSerialValue (Get (FileName); "Contacts::ContactID")
Might return 84.
: FileMaker Specifications
FileMaker 8 Product Line
Specifications and Storage Limits
Field Types and Import/Export Formats
: Calculation Functions
Working with Calculations Primer
: Custom Functions
Custom Functions Primer
Useful Custom Functions
: Script Steps
Script Step Reference
: Quick Reference
FileMaker Error Codes
FileMaker Keyboard Shortcuts
FileMaker Network Ports
FileMaker Server Command Line Reference
FileMaker XML Reference
: Other Resources
Where to Go for More Information