Calculated field based on ID

A client asked me today why he can’t get his calculated field to work.
The field was a simple calculated field with the formula =ID. With other words, he wanted to copy the ID field to the calculated field.

The problem he was facing was that the field value was always 0 when the item was created. If the then went in and modified the calculated field, the value was updated.
I made some digging and found this article.

You cannot reference the ID of a row for a newly inserted row. The ID does not yet exist when the calculation is performed.

Solution/workaround:
I suggested that he made a small workflow in SharePoint Designer 2010 that did the copying for him, and then run this workflow automatically when an item is created.

Leave a comment