UPDATEFIELD Method

Applies to: SharePoint Foundation 2010

Modifies the schema of an existing field in a SharePoint list.

Note

This method is deprecated and may not be supported in future releases. Instead, use the following Web service method:UpdateList(String, XmlNode, XmlNode, XmlNode, XmlNode, String) Web service method.

<Method ID="Text">
  <SetList Scope="Request">GUID</SetList>
  <SetVar Name="Cmd">UPDATEFIELD</SetVar>
  <SetVar Name="FieldXML">&lt;Field ColName=&quot;tp_Title&quot; 
    Type=&quot;Text&quot; Name=&quot;Title&quot; DisplayName=&quot;Title&quot; 
    FromBaseType=&quot;TRUE&quot; MaxLength=&quot;255&quot; 
    Description=&quot;this is an update&quot;/&gt;
  </SetVar>
  <SetVar Name="owshiddenversion">Integer</SetVar>
</Method>

Parameters

Parameter

Description

ID = "Text"

Application-specific string. In an HTML editor compatible with Microsoft Windows SharePoint Services, such as Microsoft Office SharePoint Designer 2007, the string provides the sequence number and name of the method.

Scope = "Request"

When set to Request, the Scope attribute sets the variable for the scope of the enclosing Method element, unless the variable is changed by another tag.

Name = "Cmd"

Must be set to UPDATEFIELD.

Name = "FieldXML"

The XML description of the updated field. For the full set of available attributes and values that can be included, see the Field element in Collaborative Application Markup Language Core Schemas.

Name = "owshiddenversion"

This is the current version number of the list. The UPDATEFIELD command works only if Windows SharePoint Services and the client application agree on the version number of the list. This ensures that only one user at a time can modify the list schema.

Decoded

<Method ID="0,UPDATEFIELDTitle">
  <SetList Scope="Request">GUID</SetList>
  <SetVar Name="Cmd">UPDATEFIELD</SetVar>
  <SetVar Name="FieldXML">&lt;Field ColName=&quot;tp_Title&quot; 
    Type=&quot;Text&quot; Name=&quot;Title&quot; 
        DisplayName=&quot;Title&quot; 
    FromBaseType=&quot;TRUE&quot; MaxLength=&quot;255&quot; 
    Description=&quot;this is an update&quot;/&gt;
  </SetVar>
  <SetVar Name="owshiddenversion">13</SetVar>
</Method>