Auto Generate ID with Month and Year

It is possible to generate auto increment ID which also contains Year and Month and will automatically reset when the month change.

for example: 2019110001, 2019110002, 2019120001

I'm Beginner in Outsystems. 

Hi! 

I don't think so. AutoNumber is an integer incremented by 1 for each new record. 

But you can build  the field yourself and designate that field as the Id of the entity, or create a index :

The "unique" parameter from the index will help you not allowing duplicates in this field. 

Hope this helps

Regards

Graça

Maria da Graça Peixoto wrote:

Hi! 

I don't think so. AutoNumber is an integer incremented by 1 for each new record. 

But you can build  the field yourself and designate that field as the Id of the entity, or create a index :

The "unique" parameter from the index will help you not allowing duplicates in this field. 

Hope this helps

Regards

Graça

Hi Graca,


Thank you for sharing your idea, but what i did instead is to create formulated column in the aggregate and get the received date 

Example:

SyntaxEditor Code Snippet

Replace("SPGI"+ Device.DateReceived + Device.Id, "-","")
Solution

If you want it to be stored in the DB so you can query against it, the right approach is CRUD wrappers.

J.Ja

Solution