
Announcements
Hello there!
I'm creating a new table in Dataverse and I want to set the main column as autonumeric.
I want to get this model of sequence:
yyyyMMdd-sequence Example: 20230411-001, 20230411-002, 20230411-003, 20230412-001, 20230413-001
I already try this format: {DATETIMEUTC:yyyyMMdd}-{SEQNUM:3} but I get this...: 20230411-001, 20230411-002, 20230412-003, 20230413-004 the sequence number never reset when it's the next day
Any help is appreciated! 😄
Hi @AntonioMF,
Unfortunately it's not possible to reset for the next day. SEQNUM is a special variable maintained at the database level (Azure SQL). Even if you insert a row and delete it, then next sequence will not use the number that was deleted but continue on the increment. If you absolutely require that logic then I would write a synchronous Dataverse plugin that calculates the sequence on create of a new row, but this requires coding experience. You can use Power Automate however it will run asynchronously and cannot garantie the proper sequence based creation time (eg the 2nd record created runs before the 1st record got to complete).
Hope this helps!