Jump to content

Non-standard serialization?


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

Recommended Posts

  • Newbies

Hi...I'm new to the forum and an "intermediate" level FM person...I apologize if this question is elementary, but...

How can I create an "Invoice ID" field that utilizes the first 3 or 4 characters of a company's name and a company-specific serial number??

Eg: if I have 2 companies in my DB (Curly, Larry) and I generate invoices for each of them. I want each company's invoices to have their own sequential serial #'s, even if the invoices themselves are not created sequentially. So, Curly's would always be CUR-001, CUR-002, CUR-003, etc. and Larry's would be LAR-001, LAR-002, LAR-003 regardless of creation order vis-a-vis the other company.

Is there some way to build the field such that it looks for the Customer's invoices and puts the NEXT serial number for THAT company, instead of just a standard serial number? Thanks!

Link to comment
Share on other sites

Yes. store the invoice numbers in a single-record table, and script the process to edit the record and increment the appropriate number each time an invoice is created.

Note, please, that you should NEVER use these invoice numbers as the key fields for the table relationships. Use normal auto-entered serial numbers for the primary keys. The users never neeed to see these anyway.

Link to comment
Share on other sites

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