Jump to content
Sign in to follow this  
John Florance

Non-standard serialization?

Recommended Posts

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!

Share this post

Link to post
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.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    Matt Cudmore 
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.