I want to generate four bit pipeline code in sequence, such as 2020-00012020-0002, and so on to 2020-1999. How to achieve this

0
I want to generate four bit pipeline code in sequence, such as 2020-00012020-0002, and so on to 2020-1999. How to achieve this
asked
1 answers
0

You can create a microflow to achieve this, that does something like this:

To create the 0001 code you can use the java action ‘StringLeftPad’ from the community commons module to add the leading zero's. 
In order for the number to be in sequence you probably need to store the number in an entity.You can then do a db retrieve of the heighest number. You can either use an autonumber or do a +1 on the integer.

Then to create the string code you can create a variable that combines the above code with a formatdateTime(CurrentdateTime, ‘yyyy')
 

answered