This documentation is archived and is not being maintained.

Column Element

SharePoint Team Services 1.1

The Column element is used to return the raw data value for a particular field (as opposed to the formatted version provided by the Field element). In the case of a lookup field, Column returns the local value (an ID number in the lookup list), while the LookupColumn element returns the data from the foreign table.


  AutoHyperLink = "TRUE" | "FALSE"
  AutoNewLine = "TRUE" | "FALSE"
  Default = "Text"
  HTMLEncode = "TRUE" | "FALSE"
  Name = "Text"
  StripWS = "TRUE" | "FALSE"
  URLEncode = "TRUE" | "FALSE"
  URLEncodeAsURL = "TRUE" | "FALSE">


AutoHyperLinkOptional Boolean. TRUE if <A> tags are added to text if it looks like a hyperlink.
AutoNewLineOptional Boolean. TRUE if <BR> tags are inserted into the text stream and multiple spaces are replaced with non-breaking spaces.
DefaultOptional Text. Renders the text assigned to this attribute if the value returned by a selection is an empty string ("").
FormatOptional Text. Controls the date formatting for date fields. Supported formats include DateTime, DateOnly, TimeOnly, ISO8601, and ISO8601Basic.
HTMLEncodeOptional Boolean. Converts embedded characters so that they are displayed as text in the browser. In other words, characters that could be confused with HTML tags are converted to entities.
NameOptional Text. Allows the Column element to be used outside the field rendering context by supplying an ID, for example, <Column Name="ID"/>
StripWSOptional Boolean. TRUE if white space is removed from the beginning and end of the value returned by the Column element.
URLEncodeOptional Boolean. When TRUE, converts special characters, such as spaces, to quoted UTF-8 format (for example, %c3%ab for character ).
URLEncodeAsURLOptional Boolean. Like URLEncode, but TRUE if what is being encoded is a path component of a URL.

Related Elements

Parent Elements
Case, Default, DisplayPattern, Else, Expr, Expr2, Length, Limit, ListFormButtons, MapToIcon, RenderPattern, ScriptQuote, Then, ViewBody


Note that using an empty Column element (<Column/>) is sensitive to the current setting of the DisplayMode variable. The display mode is set implicitly according to the current command being used. If a view or item is being displayed, DisplayMode is set to Display. If a new item is being created from a form, DisplayMode is set to New. If an existing item is being edited, DisplayMode is set to Edit. The DisplayMode variable can be overridden in the page by setting it directly, for example, <SetVar Name="DisplayMode">Edit</SetVar>.

Using <Column/> to render a date field or a number field will render the data in the locale of the server because <Column/> renders numeric values according to the locale-specific rules of the server.


The following example evaluates the FreeForm variable to determine how to render a value in a field. If the variable is set to TRUE, the value is placed freeform; otherwise, the value is right-aligned.

<RenderPattern Name="DisplayPattern" DisplayName="DisplayPattern">
      <GetVar Name="FreeForm"/>
    <Case Value="TRUE">
        <![CDATA[ <DIV ALIGN=RIGHT> ]]>
        <![CDATA[ </DIV> ]]>

See Also




Universal Attributes for Page Rendering Elements