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 2019-001

(0) ShareShare
ReportReport
Posted on by 179

I had set this up a year ago with Sharepoint Designer and it still works: when I create a new item, a unique identification number is generated using the year + an incremental number from another list, as shown in my pictures here.

Now I want to do the same in another list that I have, but I don't use Sharepoint Designer any more and wonder if I can do the same with Ms Flow?

 

 

064.JPG

065.JPG

probably something like this but I don't fully understand it:

https://powerusers.microsoft.com/t5/Building-Flows/Autogenerating-a-unique-ID-number/m-p/142345#M14182

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi @Dricc ,

     

    Do you want to update the item with format Year-Number?

     

    Please try with action Increment variable to see if it will work for your scenario.

     

    I have set up the flow likes below for your reference.

     

    Function used in Compose action is:

    length(body('Get_items')?['value'])

    1.PNG

     

    Best regards,

    Mabel          

     

  • Dricc Profile Picture
    179 on at

    Thank you very much, @v-yamao-msft .

    Where do I tell the flow to take the year information?

    Should I enter an ODATA query in Get items?

  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi @Dricc ,

     

    I am using a function to get the current Year info:

     

    Utcnow(‘yyyy’)
    
    

     

    Best regards,

    Mabel

     

  • Dricc Profile Picture
    179 on at

    Hi @v-yamao-msft Thanks. And something else: can I put a condition like do it only when a field in a column (a choice column) contains certain text? how would the flow be?

    Also, can I make the count start at a certain number, let's say 172 ?

  • Dricc Profile Picture
    179 on at

    Would this work, to put a condition?

     

    066.JPG067.JPG

     

     

    I've been playing around with it in a trial list that I have. There, the count starts at 032. Who knows why. 2019-032, 2019-033, 2019-034...

  • Dricc Profile Picture
    179 on at

    Hello @v-yamao-msft do you have an idea?

  • Dricc Profile Picture
    179 on at

    @v-yamao-msft  I got my condition working. Now my issue is that I would like that also the count skips the line items when the condition does not apply. You see in my screenshot below that the generated number passes from 2019-34 over to 2019-38:

     

    074.JPG

     

    Also, if anyone knows how to make the count start at a certain number, lets say 162, I would love to know. Many thanks.

  • Verified answer
    Dricc Profile Picture
    179 on at
  • Powerplatform01 Profile Picture
    386 on at

    @Dricc 

    You can watch this video to resolve your issue.

    Also request you to please subscribe this channel.

    https://youtu.be/LSjDBxgIQZ8

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 711

#2
Vish WR Profile Picture

Vish WR 691

#3
Haque Profile Picture

Haque 525

Last 30 days Overall leaderboard