Monday, January 28, 2008

Calculated column value disappears after the item gets updated

This does not apply to all calculated columns, just to some of them J.
Here is an example: I’ve had created a calculated column with the following calculated value [ID], initially the column gets populated with the item ID just fine.
After the item gets updated, the calculated value disappears from the field. Here is a little workaround I’ve came up with.

Create a workflow in the SharePoint Designer attach it to your list, workflow should start on item creation, allow this workflow to populate the field with the desired value.

3 comments:

Anonymous said...

an example for the workflow would be great

Natalya Voskresenskaya [SharePoint MVP] said...

Just create a field (not calculated field) and in the workflow set value of this field to ID

Richard Rodriguez said...

myemailisfull@gmail.com says:
Even when you were not specific, you gave me light and I actually feel kind of stupid, because I did have the option and never uses it.
I was trying to populate a calculated value with the ID assign by Sharepoint. But sometimes the ID is assigned after the issue is saved, the formula will not be able to capture the value and populate the field.
I created a single text field and then create a workflow in Sharepoint designer. I establish a relation with the LIST on sharepoint and chose the option to run the workflow everytime a new item is ccreated. I went directly to the actions and chose: SET FIELD IN CURRENT ITEM. I chose the field from the list and chose the value ID as a source to my target field. Works as magic. If anyone wants more details can contact me to my email: myemailisfull@gmail.com