
Announcements
Hi,
I have an apps with CDS as the datasource. I created an id field (Primary key) in my entity. Its data type is Autonumber with format: {DATETIMEUTC:yyyyMMdd}_{SEQNUM:3}. Does anyone know how can I reset the sequence number daily.
E.g. Date: 07-Jun-2020 => id: 20200607_001, 20200607_002, 20200607_003
For next day, date: 08-Jun-2020 => id: 20200608_001, 20200608_002
So the seq number is reset on the next day.
It doesn't. the sequential number just keeps incrementing.
you may want to look at an alternative option of not using the auto number field and using just a text field (which you could still make a primary key). Then you could use Power Automate to create your autonumber and have flow build the string and get the max sequence number for the day and add one.
that would be a background process, so the number wouldn't appear instantaneously. You could also use a synchronous plugin if you wanted to do this real time with custom logic.