Lawlerdev Posted October 22, 2004 Posted October 22, 2004 I am using the design function Getnextserialvalue to place the next serial number from the field serial number in another field. The function is in a set field script step GetNextSerialValue ( Get ( FileName ) ; test::Serial No ). The field Serial no is an auto enter number. The script returns no value! Any ideas? Thanks in advance. Stephen.
-Queue- Posted October 22, 2004 Posted October 22, 2004 Are you performing the step in Find Mode or Browse Mode? Is test the current table or a related one? If it's related, is it related to the current layout's TO?
bruceR Posted October 24, 2004 Posted October 24, 2004 You don't want to use the relation. You need to enter the exact name of the field.
Lawlerdev Posted October 26, 2004 Author Posted October 26, 2004 I am using FMD 7.0v3 and I enclose a file to show you that it still won't work. I think it's a bug! Getnextserial.zip
Deep Thought II Posted October 26, 2004 Posted October 26, 2004 when u use GetNextSerialValue, u must use the form, GetNextSerialValue("Customers";"CustID"), in ur case, it will be: GetNextSerialValue(Get(FileName);"Getnextserial::Serial No") u missed to place the " (quotes) around ur field name.
Lawlerdev Posted October 26, 2004 Author Posted October 26, 2004 Yes that's the problem. I don't understand why the quotes are needed as the function doesn't show the quotes and there is no error if not used. Thanks for your help.
-Queue- Posted October 26, 2004 Posted October 26, 2004 I would assume if the quotes are not present, it assumes the field name is contained in the specified field. This is similar to the way GetField(fieldname) uses the value of fieldname to determine which field to get. Update: I just tested and this is indeed the case. If g is a global text field containing "table::serial", then GetNextSerialValue( Get(FileName); table::g ) returns the next value of table::serial.
Recommended Posts
This topic is 7596 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