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

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

Recommended Posts

  • Newbies
Posted

I have a program that has package numbers in it, i want the customer number to go in serial number based on the package. In other words when i hit New Record, I want the "Customer Id field" to wait until a package number is selected in the "Package Field", when a package is selected, ex. Package "1A" I want the Customer ID Field to look up all the records that are 1A and look at the last records Customer ID number and add 1 to that new record.

So in other words, if I have 360 records on Package 1A and 210 records on package 1B, when i hit new record and then hit package 1A , i want the Customer ID field to show 361, if i hit package 1B i want the customer ID to show 211.

Please include a sample of the script code to be written. And if it is possoble to insert the script in the definition of the Customer Id field.

Please help, as this problem is driving me crazy.

Thanks

Adam

Posted

It is a calculation, either scripted or autoentered. It looks for the Max value of SerialNumber (or whatever your field is called) through the self relationship (to the same file) via the CustomerID (or whatever the field is called).

This will get the max serial value for the customer and add 1 to it to generate the next serial number.

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