<?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: InfoPath 2013 - Null values passed to a stored procedure</title><link>https://www.infopathdev.com:443/forums/thread/106667.aspx</link><pubDate>Wed, 18 May 2016 16:18:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:106667</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/106667.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=106667</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;So - the button is inside the repeating table? You want to use e.Source to select the current repeating node.&lt;/p&gt;&lt;p&gt;&lt;a href="https://msdn.microsoft.com/EN-US/library/microsoft.office.infopath.clickedeventargs.source.aspx"&gt;https://msdn.microsoft.com/EN-US/library/microsoft.office.infopath.clickedeventargs.source.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Probably:&lt;/p&gt;&lt;p&gt;string cancelledreason = e.Source.SelectSingleNode(&amp;quot;ns1:CancelledReason&amp;quot;, NamespaceManager).Value;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>InfoPath 2013 - Null values passed to a stored procedure</title><link>https://www.infopathdev.com:443/forums/thread/106504.aspx</link><pubDate>Tue, 10 May 2016 10:43:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:106504</guid><dc:creator>HelenR</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/106504.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=106504</wfw:commentRss><description>Hi!
&lt;p&gt; 
&lt;br /&gt;I have created a repeating table in InfoPath 2013 which looks like the following: 
&lt;p&gt; 
&lt;br /&gt;Id   &amp;nbsp;     Cancel             &amp;nbsp;&amp;nbsp;Cancelled reason 
&lt;br /&gt;1    &amp;nbsp;    Cancel button    &amp;nbsp;Text box 
&lt;br /&gt;2    &amp;nbsp;    Cancel button    &amp;nbsp;Text box 
&lt;p&gt; 
&lt;br /&gt;When the user clicks on the ‘Cancel’ button a SQL stored procedure is called. The stored procedure requires two parameters, the ID of the record and the cancelled reason (which the user will enter in the text box).
&lt;p&gt; 
&lt;br /&gt;This is the C# code behind the button:
&lt;p&gt; &lt;/p&gt;
&lt;br /&gt;public void CTRL110_5_Clicked(object sender, ClickedEventArgs e)
    &lt;br /&gt;    { 

         &lt;br /&gt;    XPathNavigator dom = MainDataSource.CreateNavigator();
         &lt;br /&gt;    string cancelledreason = dom.SelectSingleNode(
         &lt;br /&gt;    &amp;quot;/dfs:myFields/dfs:dataFields/ns1:SharePointListItem_RW/ns1:CancelledReason&amp;quot;, NamespaceManager).Value;
&lt;p&gt;
           &lt;br /&gt;  XPathNavigator dom2 = MainDataSource.CreateNavigator();
          &lt;br /&gt;   string RId = dom2.SelectSingleNode(
          &lt;br /&gt;   &amp;quot;/dfs:myFields/dfs:dataFields/ns1:SharePointListItem_RW/ns1:RId &amp;quot;, NamespaceManager).Value;
           &lt;p&gt;
          &lt;br /&gt;   AdoQueryConnection connection = (AdoQueryConnection)DataConnections[&amp;quot;conn&amp;quot;];
&lt;p&gt;
          &lt;br /&gt;   string userName = null;
          &lt;br /&gt;   SPClaimProviderManager mgr = SPClaimProviderManager.Local;
          &lt;br /&gt;   if (mgr != null)
           &lt;br /&gt;  {
           &lt;br /&gt;      userName = mgr.DecodeClaim(SPContext.Current.Web.CurrentUser.LoginName).Value;
          &lt;br /&gt;   }
            &lt;p&gt;
          &lt;br /&gt;   string originalCommand = connection.Command;
&lt;p&gt;
            &lt;br /&gt; connection.Command = &amp;quot;EXEC SP_Cancel &amp;#39;&amp;quot; + cancelledreason + &amp;quot; - &amp;quot; + userName + &amp;quot;&amp;#39;,&amp;quot; + &amp;quot;&amp;#39;&amp;quot; + RId + &amp;quot;&amp;#39;&amp;quot;;
            &lt;br /&gt; connection.Execute();
&lt;p&gt;
          &lt;br /&gt;  connection.Command = originalCommand;
      &lt;br /&gt;  }
&lt;p&gt; 
&lt;br /&gt;When I click on the cancel button a value of null is only available for cancelledreason and RId. 
&lt;p&gt; 
&lt;br /&gt;Please can you assist with helping me resolve it?
&lt;p&gt; 
&lt;br /&gt;Cheers,
&lt;br /&gt;Helen</description></item></channel></rss>