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

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:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    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

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard