Jump to content

Serial Number field with prefix


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

Recommended Posts

So I have a situation where I want my unique ID field to be a serial number with the prefix of "16-", with the 16 representing the year 2016.  In a perfect world this would update on January 1 of next year to "17-", but I'd be just fine with going in and updating the necessary field for it to show 17. Surely there is a way to do this, and its just me having no such luck? Any help greatly appreciated! 

Link to comment
Share on other sites

I would suggest you use two fields: one that auto-enters a serial number, and one that auto-enters a calculated value =

Right ( Year ( Get ( CurrentDate ) ) ; 2 ) & "-" & SerialID

Or, if you have a Date field, you could merge it with the serial ID field and format the object to display only the YY portion of the date.

 

 

Edited by comment
Link to comment
Share on other sites

Ive never been a big fan of "smart" serial numbers for use as a primary key value for a record.

human interaction with keys usually = data integrity issues.

Use smart serials for display to the user but think about avoiding them for relationships.

Just my two cents worth.

  • Like 1
Link to comment
Share on other sites

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