error in xml file?

Nov 5, 2009 at 1:43 PM
Edited Nov 5, 2009 at 1:48 PM

Hi, great tool! But I'm getting an error on syncin' two lists DEST and SOURCE in the same website testsite:

GAC    Version        Location
---    -------        --------
True   v2.0.50727     C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SharePoint\12.0...
Unable to index into an object of type Microsoft.SharePoint.SPListCollection.
At E:\softwareDepot\splistsync1.1\splistsync1.1\SPListSync.ps1:99 char:33
+    $spListChilds = $spWeb.Lists[$ <<<< ChildslistName]
Unable to index into an object of type Microsoft.SharePoint.SPListCollection.
At E:\softwareDepot\splistsync1.1\splistsync1.1\SPListSync.ps1:120 char:33
+       $spListParent = $spWeb.Lists[$ <<<< ParentlistName]
You cannot call a method on a null-valued expression.
At E:\softwareDepot\splistsync1.1\splistsync1.1\SPListSync.ps1:124 char:50
+     $filteredParents = $spListParentCol.GetDataTable( <<<< ) | select * | out
-datatable
Attempted to divide by zero.
At E:\softwareDepot\splistsync1.1\splistsync1.1\SPListSync.ps1:131 char:15
+    $astep=100/$ <<<< filteredParents.Count

 

My config looks like:

<?xml version="1.0" ?>
<confSPListSync>
   <site id="1">
 <siteurl>http://moss01:12175/sites/testsite</siteurl>
 <webname></webname>
 <ParentSQLServer></ParentSQLServer>
 <ParentSQLDatabase></ParentSQLDatabase>
 <ParentSQLStatement></ParentSQLStatement>
 <parentlistname>SOURCE</parentlistname>
 <parentlinkcolumn>NEW_ID</parentlinkcolumn>
 <childlistname>DEST</childlistname>
 <childlinkcolumn>NEW_ID</childlinkcolumn>
 <CreateNewChilds>0</CreateNewChilds>
 <SyncColumn id="1">
    <ParentColumn>Title</ParentColumn>
    <ChildColumn>Title</ChildColumn>
 </SyncColumn>
 <SyncColumn id="2">
    <ParentColumn>Adres</ParentColumn>
    <ChildColumn>Adres</ChildColumn>
 </SyncColumn>
 <SyncColumn id="3">
    <ParentColumn>Status</ParentColumn>
    <ChildColumn>Status</ChildColumn>
 </SyncColumn>
    </site>
  
</confSPListSync>

 

Can you please help?

 

Best regards, Jaco

Nov 5, 2009 at 3:26 PM

Got it working now!

sites/testsite has to be in the <webname>...