GetNextSerialValue( fileName ; fieldName)
All Current Versions Of FileMaker
Returns A Text Result
As you know, you can have a field auto enter a serialized value when a new record is created. The GetNextSerialValue function will know what that next serial value will be, without creating the record.
The function does have the two parameters of filename and fieldname. It is not a bad idea to specify the table occurrence as a prefix to the field name. So you would be looking at something like TableOccName::FieldName. If you don't specify the table occurrence you are going to want to use, FileMaker assumes that you want the table occurrence that is linked to the layout on the current active window.
FYI ... You cannot specify a table, you have to specify a table occurrence. In fact, you can specify any table occurrence that used the table you want. This is because all the fields are exactly the same with table occurrences that use the same base table. This will likely not be a problem for those that embrace the Anchor/Buoy relationship design method.
© 2010 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. FileMaker Pro is the registered trademark of FileMaker Inc.