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

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

Recommended Posts

Posted

Does anyone see anything bluntly wrong with this script? The two tables are related via a Constant.

If [ IsEmpty ( ddd_online::zContact_ID ) ]

Insert Calculated Result [ ddd_online::zContact_ID; GetNextSerialValue ( "trip_d" ; Contacts::Contact_ID) ]

[ Select ]

End If

I've trying to use this when importing records from another files. Is this not how you use the GetNextSerialValue?

I've also tried this as the script.

If [ IsEmpty ( ddd_online::zContact_ID ) ]

Set Next Serial Value [ ddd_online::zContact_ID; Contacts::Contact_ID ]

End If

TIA.

Posted

Insert Calculated Result [ ddd_online::zContact_ID; GetNextSerialValue ( "trip_d" ; Contacts::Contact_ID) ]

Try:

Insert Calculated Result [ ddd_online::zContact_ID; GetNextSerialValue ( "trip_d" ; "Contacts::Contact_ID") ]

The GetNextSerialValue() is an odd function, in the Design section, because it wants the field name in quotes. The reason for this (I think) is that it often would be used to get the value from a file which would did not have any kind of relationship from where you are; which you wouldn't if you were doing an automated update, which is what the function was designed for.

It would be nice if it would also accept unquoted values, because it's so easy to overlook. But that's really a very different thing.

Posted

I've trying to use this when importing records from another files. Is this not how you use the GetNextSerialValue?

I don't think so. If you're unable to auto-enter the serial numbers during import, you should use Replace Field Contents [serial numbers] to number the imported records. You can use Set Next Serial Value[] to preset the numbers either before or after the import, but in most situations you wouldn't need to.

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