SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an existing list with a text field and records in it. Now I want to change that text field into a calculated field to make it concat two other text fields in the list (possibly by changing the schema related to that field thru code behind). I've tried doing..

fieldThree.Type = SPFieldType.Calculated;
SPFieldCalculated calcField = (SPFieldCalculated)fieldThree;
calcField.Formula = @"=CONCATENATE([fieldOne],"" "",[fieldTwo])";

As it seems.. I can't explicitly convert a text field to a calculated one.

share|improve this question
@Cimares answer is correct. One side note: To update field definition you need to use fieldThree.Update() instead of myList.Update. In this case it will throw Non-supported field type change exception. – Vedran Rasol May 25 '12 at 11:43

As you've found, you can't convert a text field into a calculated one. What you'll have to do is add the calculated field as a new column.

If you want to do this through code you'll need to use the SPList.Fields.Add() method.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.