Add Prefix To ID

  • 9 March 2016
  • 1 reply
  • 7 views

Badge +1

Hi,

I am new in K2 

 

I want to generate a unique ID number in the following format CRE<yy><4
digit running number, and ID number will reset after every calendar year.

 

Thnanks in Advance...


1 reply

Badge +10


Create a year Table with incremental ID's
Create a Expression to create the custom Prefix
MyPrefix= concatenate("CRE",YYYY,ID)
NOTE instead of 2016 I would extract the Current Year

Perhaps update the Year table with the reference if needed for reporting
Use the latest value from a view list, page 1 at the time sort ID Desc. this way you always get the lastest PREFIX.

Take a look to the following post for more details
http://community.k2.com/t5/K2-blackpearl/Add-Prefix-To-ID/m-p/87922#M27350

Reply