How to work with content type column in calculated field in SharePoint 2013 after migrating from Moss 2007?

How to work with content type column in calculated field in SharePoint 2013 after migrating from Moss 2007?
InfoPath alternatives for form designing SharePoint

In this post we will discuss how we can work with Content Type column field in calculated column in SharePoint 2013. Just to let you know that this issue we face in one site which we have migrated from Moss 2007 to SharePoint 2013. There in one the list they we using a calculated column which was using the content type column in the formula. The values were appearing correctly in moss 2007 site but in sharepoint 2013 the list column value was appearing like:

error;#512

How to work with content type column in calculated field in SharePoint 2013 after migrating from Moss 2007?
How to work with content type column in calculated field in SharePoint 2013 after migrating from Moss 2007?

Also you can read:
– Delegate Controls in SharePoint 2013 using Visual Studio 2013

– Data connection library missing in sharepoint 2013

– Get All Attachments From SharePoint 2013 List Item using Rest API

Now when we check the formula in moss 2007 it appears like below:

=LEFT([Content Type],FIND(“Request”,[Content Type])-1)&”Project”

How to work with content type column in calculated field in SharePoint 2013 after migrating from Moss 2007?
How to work with content type column in calculated field in SharePoint 2013 after migrating from Moss 2007?

And the corresponding formula in SharePoint 2013 comes as:

=LEFT(#NAME?,FIND(“Request”,#NAME?)-1)&”Project”

How to work with content type column in calculated field in SharePoint 2013 after migrating from Moss 2007?
How to work with content type column in calculated field in SharePoint 2013 after migrating from Moss 2007?

Solution:
Actually the Content Type column for calculated column has been removed from SharePoint 2010 onwards. Column types of text, number, datetime, choice, workflowstatus, boolean and calculated are available for Calculated column formula’s. Since content Type is of type “Computed” it is not made available.

So to make this work, we need to modify the logic and may be need to redesign the list according to your requirement. In our case we create another field and we put our logic there.

Hope this will be helpful.

Similar SharePoint 2013 Tutorials

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →

Leave a Reply