Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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.

Posted

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?

Posted

You don't want to use the relation. You need to enter the exact name of the field.

Posted

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.

Posted

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.

Posted

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.

This topic is 7332 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.