<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SharePoint Integration</title><link>https://www.infopathdev.com:443/forums/46.aspx</link><description> For questions concerning issues in the integration of SharePoint and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Updating List via CAML: Can't create new list item if target is a lookup field?</title><link>https://www.infopathdev.com:443/forums/thread/84677.aspx</link><pubDate>Fri, 23 Nov 2012 17:35:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84677</guid><dc:creator>Sfarrell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84677.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=84677</wfw:commentRss><description>Sounds great Hilary. I&amp;#39;ll give that a shot.&lt;br /&gt;
One way or another I&amp;#39;ll be back shortly!&lt;br /&gt;</description></item><item><title>Re: Updating List via CAML: Can't create new list item if target is a lookup field?</title><link>https://www.infopathdev.com:443/forums/thread/84676.aspx</link><pubDate>Fri, 23 Nov 2012 17:33:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84676</guid><dc:creator>Sfarrell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84676.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=84676</wfw:commentRss><description>Oh and here&amp;#39;s the xml file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;Batch OnError=&amp;quot;Continue&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Method ID=&amp;quot;1&amp;quot; Cmd=&amp;quot;New&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Field Name=&amp;quot;Title&amp;quot;&amp;gt;&amp;lt;/Field&amp;gt;&lt;br /&gt;
    &amp;lt;Field Name=&amp;quot;Project_Title&amp;quot;&amp;gt;&amp;lt;/Field&amp;gt;&lt;br /&gt;
    &amp;lt;Field Name=&amp;quot;Date&amp;quot;&amp;gt;&amp;lt;/Field&amp;gt;&lt;br /&gt;
    &amp;lt;Field Name=&amp;quot;Capacity_Requested&amp;quot;&amp;gt;&amp;lt;/Field&amp;gt;&lt;br /&gt;
  &amp;lt;/Method&amp;gt;&lt;br /&gt;
&amp;lt;/Batch&amp;gt;&lt;br /&gt;</description></item><item><title>Re: Updating List via CAML: Can't create new list item if target is a lookup field?</title><link>https://www.infopathdev.com:443/forums/thread/84675.aspx</link><pubDate>Fri, 23 Nov 2012 17:26:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84675</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84675.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=84675</wfw:commentRss><description>&lt;p&gt;So, you aren&amp;#39;t getting any errors when the code runs, just if you include the date and the capacity, your items aren&amp;#39;t created. &lt;/p&gt;&lt;p&gt;Run in &lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2009/09/27/debug-managed-code-in-vsta-for-the-accidental-programmer.aspx"&gt;debug&lt;/a&gt;, and see what batchNav looks like, so you know what the CAML is you are going to submit. Your web service submit may be returning errors that you aren&amp;#39;t seeing - you can pass some additional XPathNavigators to the execute &lt;a href="http://msdn.microsoft.com/en-us/library/office/aa943097(v=office.14).aspx"&gt;method&lt;/a&gt; that you can then look at in debug after execution so that you can see if errors are being returned either in output or errors. Don&amp;#39;t bother trying to create one for input, just output and errors - then your execute would look like .Execute(null, outputNav, errorsNav) (using the variables in the code sample from MSDN link).&lt;/p&gt;</description></item><item><title>Re: Updating List via CAML: Can't create new list item if target is a lookup field?</title><link>https://www.infopathdev.com:443/forums/thread/84674.aspx</link><pubDate>Fri, 23 Nov 2012 17:08:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84674</guid><dc:creator>Sfarrell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84674.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=84674</wfw:commentRss><description>Oops, looks like I pasted the same line twice!&lt;br /&gt;
That should have been:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;sb.AppendFormat(&amp;quot;&amp;lt;Field Name=&amp;#39;&amp;#39;Title&amp;#39;&amp;#39;&amp;gt;{0}&amp;LT;/Field&amp;GT;&amp;quot;, ProjectID&amp;GT;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;sb.AppendFormat(&amp;quot;&amp;lt;Field Name=&amp;#39;&amp;#39;Project_Title&amp;#39;&amp;#39;&amp;GT;{0}&amp;LT;/Field&amp;GT;&amp;quot;, ProjectID&amp;GT;&lt;br /&gt;
&lt;br /&gt;
Sorry for the confusion!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&amp;#39;s the code I&amp;#39;m using.&lt;br /&gt;
&lt;br /&gt;
     Public Sub AddMethodNode(ByVal id As Integer, ByVal ProjectID As Integer, ByVal pdate As Date, ByVal pcapacity As Integer)&lt;br /&gt;
            Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder()&lt;br /&gt;
            sb.AppendFormat(&amp;quot;&amp;quot;, id.ToString())&lt;br /&gt;
            sb.AppendFormat(&amp;quot;{0}&amp;quot;, ProjectID)&lt;br /&gt;
            &amp;#39;sb.AppendFormat(&amp;quot;{0}&amp;quot;, pdate)&lt;br /&gt;
            &amp;#39;sb.AppendFormat(&amp;quot;{0}&amp;quot;, pcapacity)&lt;br /&gt;
            sb.AppendFormat(&amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
            Dim methodXml As XmlDocument = New XmlDocument()&lt;br /&gt;
            methodXml.LoadXml(sb.ToString())&lt;br /&gt;
&lt;br /&gt;
            Dim secDSNav As XPathNavigator = DataSources(&amp;quot;CustomListCAML&amp;quot;).CreateNavigator()&lt;br /&gt;
            Dim batchNav As XPathNavigator = secDSNav.SelectSingleNode(&amp;quot;/Batch&amp;quot;, NamespaceManager)&lt;br /&gt;
            batchNav.AppendChild(methodXml.DocumentElement.CreateNavigator())&lt;br /&gt;
        End Sub&lt;br /&gt;
&lt;br /&gt;
        Public Sub CTRL47_28_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)&lt;br /&gt;
            &amp;#39; Delete all Method nodes from the CAML Batch XML&lt;br /&gt;
            Dim ns As XmlNamespaceManager = Me.NamespaceManager&lt;br /&gt;
            Dim secDSNav As XPathNavigator = DataSources(&amp;quot;CustomListCAML&amp;quot;).CreateNavigator()&lt;br /&gt;
            Dim iter As XPathNodeIterator = secDSNav.Select(&amp;quot;/Batch/Method&amp;quot;)&lt;br /&gt;
            Dim methodNodesCount As Integer = iter.Count&lt;br /&gt;
&lt;br /&gt;
            Dim firstMethodNav As XPathNavigator = _&lt;br /&gt;
              secDSNav.SelectSingleNode(&amp;quot;/Batch/Method[1]&amp;quot;, _&lt;br /&gt;
              NamespaceManager)&lt;br /&gt;
            Dim lastMethodNav As XPathNavigator = _&lt;br /&gt;
              secDSNav.SelectSingleNode(&amp;quot;/Batch/Method[&amp;quot; &amp;amp; _&lt;br /&gt;
              methodNodesCount.ToString() &amp;amp; &amp;quot;]&amp;quot;, _&lt;br /&gt;
              NamespaceManager)&lt;br /&gt;
&lt;br /&gt;
            firstMethodNav.DeleteRange(lastMethodNav)&lt;br /&gt;
&lt;br /&gt;
            &amp;#39; Retrieve the rows of the repeating table&lt;br /&gt;
            Dim root As XPathNavigator = MainDataSource.CreateNavigator()&lt;br /&gt;
            Dim rows As XPathNodeIterator = root.Select( _&lt;br /&gt;
              &amp;quot;/my:myFields/my:Projected_Repeating_Table/my:Table&amp;quot;, NamespaceManager)&lt;br /&gt;
&lt;br /&gt;
            &amp;#39; Loop through the rows of the repeating table&lt;br /&gt;
            &amp;#39; and construct the CAML Batch XML&lt;br /&gt;
            Dim counter As Integer = 1&lt;br /&gt;
            While rows.MoveNext()&lt;br /&gt;
                &amp;#39; Retrieve the title&lt;br /&gt;
&lt;br /&gt;
                Dim ProjectID As String = rows.Current.SelectSingleNode( _&lt;br /&gt;
                    &amp;quot;/my:myFields/my:Projected_Repeating_Table/my:Table/my:ProjectID&amp;quot;, NamespaceManager).Value&lt;br /&gt;
                Dim pdate As String = rows.Current.SelectSingleNode( _&lt;br /&gt;
                    &amp;quot;/my:myFields/my:Projected_Repeating_Table/my:Table/my:Date&amp;quot;, NamespaceManager).Value&lt;br /&gt;
                Dim pCapacity As String = rows.Current.SelectSingleNode( _&lt;br /&gt;
                    &amp;quot;/my:myFields/my:Projected_Repeating_Table/my:Table/my:Capacity&amp;quot;, NamespaceManager).Value&lt;br /&gt;
&lt;br /&gt;
                &amp;#39; Add an item to the CAML Batch XML&lt;br /&gt;
                AddMethodNode(counter, ProjectID, pdate, pCapacity)&lt;br /&gt;
&lt;br /&gt;
                &amp;#39; Increment the counter&lt;br /&gt;
                counter = counter + 1&lt;br /&gt;
            End While&lt;br /&gt;
&lt;br /&gt;
            &amp;#39; Submit the rows to the Lists web service to update the custom list&lt;br /&gt;
            DataConnections(&amp;quot;CustomListItemsSubmit&amp;quot;).Execute()&lt;br /&gt;
        End Sub&lt;br /&gt;</description></item><item><title>Re: Updating List via CAML: Can't create new list item if target is a lookup field?</title><link>https://www.infopathdev.com:443/forums/thread/84673.aspx</link><pubDate>Fri, 23 Nov 2012 16:57:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84673</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84673.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=84673</wfw:commentRss><description>&lt;p&gt;Hi - the two lines of code in your post look the same to me - I don&amp;#39;t quite understand your question.&lt;/p&gt;&lt;p&gt;Can you post your code full code? For lookup columns, you need to submit the list item id for the looked up item. For dates, the format can be a little finicky - at the very least, you need to be using yyyy-MM-dd format.&lt;/p&gt;&lt;p&gt;As a side note - &lt;a href="http://www.qdabra.com/en/products/qRules_new.aspx"&gt;qRules&lt;/a&gt; can submit to SharePoint lists - and would keep you from having to write your own code. &lt;/p&gt;</description></item><item><title>Updating List via CAML: Can't create new list item if target is a lookup field?</title><link>https://www.infopathdev.com:443/forums/thread/84670.aspx</link><pubDate>Fri, 23 Nov 2012 15:54:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84670</guid><dc:creator>Sfarrell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84670.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=84670</wfw:commentRss><description>Hi All,

Still pretty novice at the whole InfoPath/SharePoint thing so, please, be gentle with me. ;)&lt;br /&gt;
&lt;br /&gt;
Following numerous guides through the web I&amp;#39;ve managed to take a repeating table in an InfoPath form and have it submitted to an SharePoint list through CAML successfully. At least in part.&lt;br /&gt;
&lt;br /&gt;
My InfoPath repeating table has three columns: Project ID (Integer), Date (Date), Capacity (Integer)&lt;br /&gt;
&lt;br /&gt;
My Sharepoint list has the same columns with the addition of the default &amp;quot;Title&amp;quot; column for which I have no need (made non-visible).&lt;br /&gt;
&lt;br /&gt;
If I only use the following line in my code a new record is created as expected and passes the correct value.&lt;br /&gt;
sb.AppendFormat(&amp;quot;{0}&amp;quot;, ProjectID)&lt;br /&gt;
&lt;br /&gt;
However if I use the following line then nothing happens. No errors, no new list item. The same occurs when including the &amp;quot;Date&amp;quot; and &amp;quot;Capacity&amp;quot; variables.&lt;br /&gt;
sb.AppendFormat(&amp;quot;{0}&amp;quot;, ProjectID)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Project_Title&amp;quot; and &amp;quot;Capacity&amp;quot; are both lookup types while the &amp;quot;Date&amp;quot; column is, as one might assume, a date type column.&lt;br /&gt;
&lt;br /&gt;
I&amp;#39;m sure this is a simple thing to fix but, given my newness, I&amp;#39;m just not seeing it.&lt;br /&gt;
&lt;br /&gt;
Can anyone point me in the right direction?&lt;br /&gt;
&lt;br /&gt;
Let me know what additional information you might need.&lt;br /&gt;
Many Thanks in advance!&lt;br /&gt;</description></item></channel></rss>