Tuesday, May 11, 2010

The formula refers to a column that does not exist

Scenario:
While working with calculated column I got the following error,

The formula refers to a column that does not exist. Check the formula for spelling mistakes or change the non-existing column to an existing column. at Microsoft.SharePoint.Library.SPRequestInternalClass.CallCalcEngine(Int32 operation, String bstrUrl, String bstrListName, String bstrString1, String bstrString2)
at Microsoft.SharePoint.Library.SPRequest.CallCalcEngine(Int32 operation, String bstrUrl, String bstrListName, String bstrString1, String bstrString2)


Here's the formula I had, which got saved without an issue
=IF([ShowLastUpdated],[Modified],)

But when I opened the same column in edit mode and tried saving it again and got the error. On closer look I found the formula is changed to

=IF(ShowLastUpdated,Modified,) where all braces were missing.

Solution:
Adding the brackets again around the columns solved the issue. This is certainly a bug.Also when i tried with a simple formula ( =Modified ) , I didn't find this issue.

2 comments:

Stumpy August 19, 2010 at 1:56 PM  

Thank you very very much!!

Matthew Bradford February 7, 2011 at 1:53 PM  

I also just deleted the calculated column and tried from the beginning and it worked.