Share via


REORDERFIELDS Method

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Changes the order in which fields in a SharePoint list are displayed in the data entry form for the list.

<Method ID="Text">
  <SetList Scope="Request">GUID</SetList>
  <SetVar Name="Cmd">REORDERFIELDS</SetVar>
  <SetVar Name="ReorderedFields">&lt;Fields&gt;
    &lt;Field Name=&quot;field_name&quot; /&gt;
    &lt;Field Name=&quot;field_name&quot; /&gt;
    &lt;Field Name=&quot;field_name&quot; /&gt;
    &lt;Field Name=&quot;field_name&quot; /&gt;
    &lt;Field Name=&quot;field_name&quot; /&gt;
    &lt;Field Name=&quot;field_name&quot; /&gt;
    &lt;Field Name=&quot;field_name&quot; /&gt;
    &lt;/Fields&gt;
  </SetVar>
  <SetVar Name="owshiddenversion">Integer</SetVar>
</Method>

Parameters

Parameter

Description

ID = "Text"

Application-specific string. In an HTML editor compatible with 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 REORDERFIELDS.

Name = "ReorderedFields"

The CAML description of the field order.

Name = "owshiddenversion"

This is the current version number of the SharePoint list. The REORDERFIELDS command works only if Windows SharePoint Services and the client program 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,REORDERFIELDS">
  <SetList Scope="Request">GUID</SetList>
  <SetVar Name="Cmd">REORDERFIELDS</SetVar>
  <SetVar Name="ReorderedFields">&lt;Fields&gt;
    &lt;Field Name=&quot;owshiddenversion&quot; /&gt;
    &lt;Field Name=&quot;ID&quot; /&gt;
    &lt;Field Name=&quot;Title&quot; /&gt;
    &lt;Field Name=&quot;Modified&quot; /&gt;
    &lt;Field Name=&quot;Created&quot; /&gt;
    &lt;Field Name=&quot;Author&quot; /&gt;
    &lt;Field Name=&quot;Editor&quot; /&gt;
    &lt;Field Name=&quot;Edit&quot; /&gt;
    &lt;Field Name=&quot;LinkTitle&quot; /&gt;
    &lt;Field Name=&quot;Name&quot; /&gt;
    &lt;Field Name=&quot;Age&quot; /&gt;
    &lt;Field Name=&quot;FieldXYZ&quot; /&gt;
    &lt;Field Name=&quot;Address&quot; /&gt;
    &lt;Field Name=&quot;FieldABC&quot; /&gt;
    &lt;/Fields&gt;
  </SetVar>
  <SetVar Name="owshiddenversion">10</SetVar>
</Method>