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'm using C# code to automatically create a read-only Note column that is a truncated version of an existing Note column.

list.Fields.Add(field.Title + " (truncated)", SPFieldType.Note, false);

At the moment, my new column has the title "OldColumnTitle (truncated)". This is what it shows up as when selecting columns for a View, which is good. Unfortunately, this is also what it shows up as in the view itself, which is bad.

If I leave off the + " (truncated)", there's no way in the Edit View form to tell the two apart.

The Title column does what I want - it has several different variations that show up in the Edit View form as "Title", "Title (linked to item)", "Title (linked to item with edit menu)" etc, but show up in the view itself as just "Title".

How can I replicate this? It's probably just a specific property on an SPField I've missed, but if so... I've missed it.

share|improve this question
up vote 1 down vote accepted

The string property you are looking for is SPField.AuthoringInfo. Unfortunately this is a readonly property. But the value of this property is stored in the SchemaXml property of the field. So you can set this value by altering the SchemaXml.

using (SPSite s = new SPSite("http://MyWeb"))
  using (SPWeb web = s.OpenWeb())
    SPList l = web.Lists["MyList"];
    SPField f = l.Fields.GetField("MyColumn");

    XmlDocument doc = new XmlDocument();
    XmlNode fieldNode = doc.FirstChild;

    XmlAttribute attr = fieldNode.Attributes["AuthoringInfo"];
    if (attr == null)
      attr = doc.CreateAttribute("AuthoringInfo");
    attr.Value = "(truncated)";

    f.SchemaXml = doc.OuterXml;
share|improve this answer
Spot on, thanks :) – Rawling Feb 16 '12 at 13:01

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.