web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / CDS: Reset autonumber
Power Apps
Unanswered

CDS: Reset autonumber

(0) ShareShare
ReportReport
Posted on by 284

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.

I have the same question (0)
  • Joel CustomerEffective Profile Picture
    3,224 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 802 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 332 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 273

Last 30 days Overall leaderboard