ImportList

ImportList

Requests SharePoint Team Services to create a new list based upon the XML schema that is specified in the method.

Syntax

<Method ID="IDText>
  <SetVar Name="Cmd">ImportList</SetVar>
  <SetVar Name="Title">list-title</SetVar>
  <SetVar Name="RootFolder">Web-relative-folder-URL</SetVar>
  <SetVar Name="ListSchema">list-schema</SetVar>
</Method>

Parameters

  • ID = "IDText"

    Application-specific string. In Microsoft FrontPage, the string provides the sequence number of the method, the name of the method, and the name of the list to be imported*.*

  • Name = "Cmd"

  • Must be set to "ImportList".

  • Name = "Title"

  • Name of the list to be created.

  • Name = "RootFolder"

  • Folder on Web site where the list will be created. The path should be relative to the root directory of the Web site. For more information on Webs and subwebs, see the Global Administration help for FrontPage Server Extensions 2002 or SharePoint Team Services.

  • Name = "ListSchema"

  • XML schema of the list to be created.

Decoded

<Method ID="0,ImportListIdeas">
  <SetVar Name="Cmd">ImportList</SetVar>
  <SetVar Name="Title">Ideas</SetVar>
  <SetVar Name="RootFolder">Ideas</SetVar>
  <SetVar Name="ListSchema">&lt;List xmlns:ows=&quot;Microsoft SharePoint&quot; 
    Name=&quot;Documents&quot; Title=&quot;Shared Documents&quot; Url=&quot;Shared 
    Documents&quot; BaseType=&quot;1&quot;&gt;
    &lt;MetaData&gt;
    &lt;Fields&gt;
    &lt;/Fields&gt;
    &lt;Views&gt;
    &lt;{...}
  </SetVar>
</Method>

Return Value

Success

Returns the code attribute, which is a signed-decimal representation of an HRESULT.

Error

Returns an XML-encoded UTF8 text string. See SharePoint Team Services Error Message Format for more information.

Sample Output