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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create ID based on num...
Power Automate
Answered

Create ID based on number of items submitted in that month

(0) ShareShare
ReportReport
Posted on by

Hi All,

How to create an auto increment ID number according to the order of submission in that month?

Pattern = CF-xx-MMyyyy

 

Details:

CF = Text ID which will always be the same for all documents
xx = the number of documents made in that month
MMyyyy = Month & Year

 

Example =

CF-01-012024 = First document made in Jan 2024

CF-03-012024 = Third document made in Jan 2024

CF-01-022024 = First document made in Feb 2024

 

I already tried working with Get items filter query, compose & initialize variable but the flow failed.

Can someone help me with this?

Thanks a lot!

Categories:
I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @pw23 

     

    see the below design 

     

    1. Use get items where items are filtered based on created date (when created date is current month)

    Nived_Nambiar_0-1708867790686.png

     

    Filter query used - Created ge '@{startOfMonth(utcNow(),'yyyy-MM-dd')}' and Created le '@{addToTime(startOfMonth(utcNow()),1,'Month','yyyy-MM-dd')}'

     

    2. used create item to create item based on above get items results to create ID

    Nived_Nambiar_1-1708867866252.png

     

    Title has been considered as ID . Expression used- CF-@{formatNumber(add(length(outputs('Get_items')?['body/value']),1),'D2')}-@{formatDateTime(utcNow(),'MMyyyy')}

     

     

    See the results below

    Nived_Nambiar_2-1708867911698.png

     

     

    There are 4 items created in sharepoint list for this month so created one is 5th item 

     

    Hope it helps !

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 308

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 226 Most Valuable Professional

Last 30 days Overall leaderboard