Sharepoint online list serial number

Dora Yeh 176 Reputation points
2022-02-10T01:39:13.323+00:00

Hi,

I want automatically generate serial number in sharepoint online list.

example:
2022/02/10: A001-20220210-0001, A001-20220210-0002
2022/02/11:A001-20220211-0001

And I found the tutorial unique-ticket-id-generator-in-sharepoint.html , however I can't set the Counter (Number).

Please help me to solve this problem or maybe you have better solution you can tell me,thanks.

Best Regards,
Dora .

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,607 questions
0 comments No comments
{count} votes

Accepted answer
  1. Echo Du_MSFT 17,116 Reputation points
    2022-02-10T07:48:03.793+00:00

    Hi @Dora Yeh ,

    Please follow the steps:

    1.Create a Calculated column named [DateCreated]

    #Format the value of [Created] to "YYYYMMDD" format  
    =TEXT([Created],"yyyymmdd")  
    

    173061-1.jpg

    2.Create a Number column named [Counter]: This is to store the counter which is the sequence that the ticket is created of the day.

    3.Set [Counter] as hidden as it is not to be availalble for input

    • a.List settings >> Advanced settings >> Allow Managment of Content Type >> Yes

    173053-2.jpg

    • b.Go to the Item Content type and set the [Counter] field as "Hidden"

    173047-3.jpg

    4.Create a Calculated column named [CalculatedCounter]

    #Repeats text a given number of times. Use REPT() to add a number of instances of a text string.  
    =CONCATENATE(REPT("0",4-LEN([Counter])),[Counter])  
    

    173040-4.jpg

    5.Create a Calculated column named [Ticket Id]

    #CONCATENATE( ): Joins several text strings into one text string.  
    =CONCATENATE("A001 - ",[DateCreated]," - ",[CalculatedCounter],)  
    

    173063-5.jpg

    6.Go to the List, click Integrate >> Power Automate >> See your flows

    172989-6.jpg

    7.On the Power Automate page, click New flow >> Automated cloud flow

    172939-7.jpg

    8.Create the below Microsoft Flow:

    172997-8.jpg

    9.Save and Test

    10.This flow is automatically triggered when you create a new item. It takes a few seconds for the flow to run.

    173020-9.jpg

    Thanks,
    Echo Du

    ===================================

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful