"... you mean these fans?" Posted August 15, 2014 Posted August 15, 2014 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
eos Posted August 15, 2014 Posted August 15, 2014 "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?
"... you mean these fans?" Posted August 16, 2014 Author Posted August 16, 2014 Eos, I read Filemaker's definitions ... Data type returned text Originated in FileMaker Pro 6.0 or earlier 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.
"... you mean these fans?" Posted August 16, 2014 Author Posted August 16, 2014 Eos, So ... I put the field in quotes … :-) Gotcha !! :-) Thank you. Eos, GetNextSerialValue ( Get ( FileName ) ; "User::UserID" ) Works perfectly :-) Again, thank you. Tom
comment Posted August 16, 2014 Posted August 16, 2014 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 ) ) 1
LaRetta Posted August 16, 2014 Posted August 16, 2014 Great explanation, Michael. I believe I have some fields mis-specified this same way.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now