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 Unique ID like ...
Power Automate
Answered

Create Unique ID like YYYY-Iincrement in SharePoint list using Power Automate flow

(0) ShareShare
ReportReport
Posted on by 22

Hi, 

I have a column 'date' on the list sharepoint and by the column i need extract the year and creat a column with date+increment ID, but the difficult i need reset ID every year

2022-50

2022-51

2023-1

2023-2

etc...

 

can you help me ?

thanks

Categories:
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @nicolaslemerle ,

     

    Could you tell me, did you want Unique ID to be generated automatically when a new item created?

     

    I made a sample for you:

     

    Create a list that includes column 'Data' and column 'Id'. 'Data' is a date type column and 'Id' is a text type column.

    vxiaochenmsft_0-1669270214684.png

     

     

    Create a flow, and I will explain step by step.

    vxiaochenmsft_1-1669270214688.png

     

     

    When creating a new item, get all items in the list.

    vxiaochenmsft_2-1669270214691.png

     

     

    Filter the 'Date' column for items in the same year as the new item.

    substring(item()?['Date'], 0, 4)

    substring(triggerOutputs()?['body/Date'], 0, 4)

    vxiaochenmsft_3-1669270214692.png

     

     

    Gets the number of filtered items.

    Length(body('Filter_array'))

    vxiaochenmsft_4-1669270214693.png

     

     

    Update the new item.

    substring(triggerOutputs()?['body/Date'],0,4)

    vxiaochenmsft_5-1669270214695.png

     

     

    If the new item has items of the same year, the ID will increase.

    vxiaochenmsft_6-1669270214696.png

     

     

    If the new item does not have items of the same year, the ID is reset to 1.

    vxiaochenmsft_7-1669270214697.png

     

    Best Regards,

    Wearsky

  • Verified answer
    nicolaslemerle Profile Picture
    22 on at

    Hi, 

    thank you for the quickly answer !

    Yes i want the unique ID is automatically generated, when a new item created.

  • habibarif Profile Picture
    18 on at

    Hi @v-xiaochen-msft,

    Hope you are fine. 

    I need similar type of flow thats why using your solution but flow is failing. 

    Just want to know if it worked last time. 

     

    Want a flow where date and id resets every month. 

     

    Thanks in advance,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard