Creating a unique number based on a format

1
I would like to create a number ranging from YYYYMM/001 - YYYYMM/999. And everytime you create a new object the number should go up 1 (same as autonumber). How can i do this?
asked
2 answers
3

What you could do to mimic the autonumber for each month is to add an object that contains the last given out number for a month. When a new month starts or you have an object created in a new month you either create a new object or you reset the count in the settings object. This way you will never give out the same number twice during a month.

answered
2

If you want it to behave the same way as an autonumber, you should give the object an autonumber and an event handler* to set this attribute. This ensures that each number is unique, even after deletes.

*: depending on when the auto number is set, you could run this microflow as after create or before commit.

answered