Calculated Field using ID error
Good Morning,I am using a calculated column to a sharepoint list, the formula is 'ID+101'. WhenI create a new item it comes up with '101' until I go to Modify Settings and Columns, click on the Task No. column and click Save. It then updates the task number from 101 to what it should be. Recently however whenever I try to go through the process above when I click 'Save' at the end andit comes up with an error saying:ErrorCannot complete this action Please try again and gives me an option to troubleshoot which is not very helpful. The task number is not updated and stays at '101'.Any ideas on how to resolve this issue?Cheers Dave
April 7th, 2009 2:01pm

Hi Dave,The ID column of the list is assigned a value only after the record gets inserted but the calculated column valueis calculated before the data is inserted into the list so that's is why you are getting only 101 when you insert a record.If you update the record then also you will get the value reflected in your list item rather than going to "Modify Settings and Columns". Just after inserting the item click on modify item from the items context menu and click ok without modifying any value, the Task No will be updated based on the calculated formula.If you want to update a column during item insertion based on ID column than you have to write a custom code that will listen to ItemAdded event of the list item and then update the required column value.Let me know in case of any concerns or queries.Thanks and Regards,Jaimin Kansara
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2009 8:50pm

I've run into a similar situation and I have a theory... in my environment we aren't allowed to custom code, so here's what I came up with. Create an Excel spreadsheet or text file. Insert a number of records equal to your starting number minus 1 (101-1=100) Import that into an Access DB. Link the Access DB to your list. Insert the records from the Access DB to the list. <You can get here faster by setting the list up directly from Excel and importing it to SharePoint, but if your list is already created this is faster> Add one more record. Delete the prior records. That will cause the ID number to increment to your starting number so you can use the field directly without calculation or coding. It's a pain, but less of one than the alternatives if you aren't allowed custom coding.
June 3rd, 2009 11:17pm

Please see my post. This is an error that also occurs with new records but seemingly has nothing to do with new records but rather a "break" in the formula when using ID. http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/c2efe612-1775-4e49-ad38-34a0ee6b7e16
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2011 11:03pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics