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 Automate / Create ID based on num...
Power Automate
Unanswered

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,129 Super User 2025 Season 2 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

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard