GetNextSerialValue()
Category: Design
Syntax: GetNextSerialValue ( fileName; fieldName ) |
Parameters:
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
Description:
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.
Examples:
Function |
Results |
---|---|
GetNextSerialValue ("Invoices"; "InvoiceID") |
Might return 5435. |
GetNextSerialValue (Get (FileName); "Contacts::ContactID") |
Might return 84. |