Search code examples
powerappsdataverseautonumber

Dataverse Autonumber formatting - restart SEQNUM


I have a Dataverse table with a column using the Autonumber data type. The format should be the current date in MMddyy format followed by a 3 digit number that starts over at the beginning of each day. This is what I have now.

{DATETIMEUTC:MMddyy}{SEQNUM:3}

This works except the SEQNUM doesn't start back at 001 at the start of each day. I have something like this:

101122001
101122002
101222003
101222004
101322005
101322006

I want to get this instead:

101122001
101122002
101222001
101222002
101322001
101322002

Is there a way I can make this happen in the column settings, or is there a workaround to make it happen? The records are being created in a Power App.


Solution

  • As far as I know there is no out of the box way to set seq every day starting with 01.

    In short what you need is to set Seed of your autonumber to be reset to 01 at 00hrs (midnight).

    You will need extra logic for it, it could be plugin, workflow or could flow.

    I would go with cloud flow and there is unbound action which will set your seed to 01. You can run your flow every midnight.

    Ref article for help