stuj1026 Posted May 12, 2005 Posted May 12, 2005 Could someone give me an explanation of how to use GetNextSerialValue() Whatt Im doing is: I Have a number field which is auto enter serial number A global number field a script which is set field global number GetNextSerialValue ( Get ( FileName ); test_table::serial number) what am i doing wrong or what is supposed to happen when i run this script Thanks Stu
Brian C Posted May 17, 2005 Posted May 17, 2005 This process should return the next serial number in line to the global field. Let me outline the criteria for this to work as intended in my example to follow: Table Name = "TestTable" Global field name = "gNextSerial" (Options = Storage: Global Field) Number filed name = "SerialNbrID" (Options= AutoEnter: Serial Number) In a script use the following: SetField [TestTable::gNextSerial] , [GetNextSerialValue ( "TestTable" ; "SerialNbrID" )] Please note that the name of the table and the field used in the GetnextSerialValue function are separated from one another by the semicolon, and their names are in "quotes". The quotes are necessary so that the filemaker knows if it should treat the table and field names literally. If you fail to use quotes, FileMaker assumes you are attempting to build the content dynamically and as a result will attempt to refer to the stored content of the two different fields that you named to build the destination. New Example: field name: tempdata01 = "TestTable" field name: tempdata02 = "SerialNbrID" So using the above two fields you could construct the same statement by ommiting the quotes: GetNextSerialValue ( tempdata01 ; tempdata02 ) The statement above would evaluate to: GetNextSerialValue ( "TestTable" ; "SerialNbrID" ) Clear as mud?
Recommended Posts
This topic is 7128 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