Insert a List Item

NOTE: The connector can only insert list items into the root of a list.

To insert a list item, the insertXml must include the following properties.

TYPE The type of item to insert. To insert a list item, specify LISTITEM.
TITLE A name for the list item.

You must then specify either (LISTID, SITEID, and SITECOLLECTIONURL) or (INSERTFROMPATH, SITEURL, and LISTNAME).

INSERTFROMPATH To insert a list item by path, set this to TRUE.
LISTID The GUID of the list to which you want to add the list item.
LISTNAME The name of the list to which you want to add the list item.
SITECOLLECTIONURL The absolute URL of the site collection to which you want to add the list item.
SITEID The GUID of the site to which you want to add the list item.
SITEURL The absolute URL of the site to which you want to add the list item.

You can optionally add metadata to the list item.

[Prefix][FieldName] Replace [Prefix] with the value of the ItemFieldNamePrefix parameter, as set in the configuration file. Replace [FieldName] with the name of the field that you want to add, and specify the value.

For example, the value of your insertXML action parameter might look like this:

<insertXML>      
  <insert>
    <reference>TEST_LIST_ITEM</reference>
    <property name="TYPE" value="LISTITEM"/>
    <property name="TITLE" value="Title" />
    <property name="LISTID" value="26FFE115A45AF1F1"/>
    <property name="SITEID" value="E11526FFA45AF1F1"/>
    <property name="SITECOLLECTIONURL" value="http://sharepoint/SiteCollection/"/>
    <metadata name="MyPrefixMyIntegerField" value="123"/>
  </insert>
</insertXML>

To insert a list item by path, your XML might look like this:

<insertXML>      
  <insert>
    <reference>TEST_LIST_ITEM </reference>
    <property name="TYPE" value="LISTITEM"/>
    <property name="TITLE" value="Title" />
    <property name="LISTNAME" value="MyList"/>
    <property name="SITEURL" value="http://sharepoint/SiteCollection/Site/"/>
    <property name="INSERTFROMPATH" value="TRUE"/>
    <metadata name="MyPrefixMyIntegerField" value="123"/>
  </insert>
</insertXML>