Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 3809 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

 

I would like to put the next serial increment value into a message box but I get no value when I use ….

 

"Your next value is " & GetNextSerialValue ( Get ( FileName ) ; User::UserID )

 

I don't want to use it, just reference it in a message box. 

 

Since the above function yields no value in a message box, is there another way ?

 

Thank you.

 

 

Tom

 

 

Posted

"Your next value is " & GetNextSerialValue ( Get ( FileName ) ; User::UserID )

 

You need to pass the field name as a literal expression.

 

Did you read the documentation?  :sleep:

Posted

Eos,

 

I read Filemaker's definitions ...

 

Data type returned 
Originated in 
Description 
Field names must be fully qualified in the format tablename::fieldname to specify a field that exists in a table different from the current table.
Examples 
GetNextSerialValue(“Customers”;”CustID”) returns the next serial number for the CustID field.
Posted

Why don't you quote the important part:
 
Important  Literal text parameters such as filenames and layout names must be enclosed in quotation marks. Use quotation marks around field names to indicate the literal string is the parameter (omit quotation marks to indicate the value stored in the field is the parameter).
http://www.filemaker.com/help/13/fmp/en/html/func_ref1.31.34.html#1028995
 
What this means is that your version:

GetNextSerialValue ( Get ( FileName ) ; User::UserID )

looks inside the User::UserID  field for the name of the field to get the next serial value from. You need to use either:
 

GetNextSerialValue ( Get ( FileName ) ; "User::UserID" )

or, preferably (to prevent the calculation from breaking if the field is renamed):
 

GetNextSerialValue ( Get ( FileName ) ; GetFieldName ( User::UserID ) )
  • Like 1

This topic is 3809 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.