Sharepoint - Getting the ID from a New Item on a List

Alvaro Morales 1 Reputation point
2020-07-24T20:29:06.857+00:00

When a new items is submitted, I need to create a consecutive number as part of the new request code. I'm trying to use the ID number but that number ID is generated after form is submitted. How can I grab that ID number and included as part as a string that I'm using as part of my code? I'm really new with Sharepoint I can't figure out this one.

Here is the formula that I have on the column but is not getting the "(ID)" number:

=CONCATENATE(SHCCODE,"-",(MID([Type of AR],1,FIND(" -",[Type of AR],1)-1)),"-",(YEAR(Created)),"-",(ID))

Here is the response: HSC-NB-2020- (Missing the consecutive ID number)

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

2 answers

Sort by: Most helpful
  1. Itch Sun-MSFT 2,556 Reputation points
    2020-07-27T06:59:02.83+00:00

    SharePoint ID Field in Calculated Column [ID] is NOT supported and it can’t be referenced in SharePoint Calculated Column Formula, and SharePoint Column Validation.

    I suggest that you create a secondary column, and then create a workflow that assigns the ID to the column:

    1.Create a text column like "idcopy" in your list.

    2.Open your site in sharepoint designer and add a workflow to your list.

    3.Click inside Step 1 where you see the text "Start Typing or use the Insert group in the Ribbon." Click "Action" in the ribbon above. Scroll down under the "List Actions" section and choose “set field in current item”.

    13853-capture.png

    4.Click "Workflow Settings" on the ribbon

    13881-capture2png.png

    Modify your formula.

    1 person found this answer helpful.
    0 comments No comments

  2. Alvaro Morales 1 Reputation point
    2020-07-27T16:04:01.537+00:00

    This works!

    @Itch Sun-MSFT

    You are amazing... I really appreciate your help. I was getting crazy trying to figure out.

    Thank you so much!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.