Jump to content

Serial Numbers based on Month & Yr


jf131
 Share

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

Recommended Posts

  • Newbies

I have a customer db that has a serial number which is based on the month & yr i.e. Jan 06 = 2601xxx. Right now I have to go in and change the serial number at the start of each month....any ideas on how to automate this would be appreaciated!

Link to comment
Share on other sites

Hi & welcome to the forum.

Serial key fields should be simply a straight number, however what you want could be calculated as a second field that the user accesses instead of the real serial.

root number does not reset does it? a true serial should not.

SerialField = autoenter serial

CalcField = GetAsText(SerialField)&GetAsText(Month(Get(CurrentDate)))& GetAsText(Right(Year(Get(CurrentDate)),2)

CalcField result should be text

SerialField should be number

That should get your month and year entered into your field dynamically.

HTH,

Tim

Link to comment
Share on other sites

Well, it's best to avoid these types of serial numbers altogether. It's much easier to deal with and less problematic if the relational keys have no real-world significance.

If it's important to know when a customer was added, why not simply use a Creation Date field?

Link to comment
Share on other sites

  • Newbies

Thanks for the info, the serial# actually is our job#. The first 2 digits represent the year the order was placed, the next 2 digits represent the month and the last 3 digits represent the number of orders received in that month 1,2,3... up to 999. The serial# has no bearing on which customer placed the order.

Link to comment
Share on other sites

This topic is 5777 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
 Share

×
×
  • Create New...

Important Information

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