Newbies jf131 Posted December 12, 2006 Newbies Posted December 12, 2006 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!
Tim W Posted December 12, 2006 Posted December 12, 2006 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
Ender Posted December 12, 2006 Posted December 12, 2006 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?
Conner Posted December 12, 2006 Posted December 12, 2006 Ender is right. If you still want to see the date combined with the serial number, simply create a calculation field with the formula: Serial & Creation Date
Newbies jf131 Posted December 12, 2006 Author Newbies Posted December 12, 2006 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.
Recommended Posts
This topic is 6617 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 accountSign in
Already have an account? Sign in here.
Sign In Now