October 22, 200421 yr 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.
October 22, 200421 yr 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?
October 24, 200421 yr You don't want to use the relation. You need to enter the exact name of the field.
October 26, 200421 yr Author 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
October 26, 200421 yr 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.
October 26, 200421 yr Author 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.
October 26, 200421 yr 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.
Create an account or sign in to comment