<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Problem with programatically inserting a row in repeating table.</title><link>https://www.infopathdev.com:443/forums/thread/45706.aspx</link><pubDate>Mon, 10 Aug 2009 15:23:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45706</guid><dc:creator>kalyan@infopath</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45706.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=45706</wfw:commentRss><description>&lt;p&gt;I haven&amp;#39;t find the solution yet, Please help.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Kalyan. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Problem with programatically inserting a row in repeating table.</title><link>https://www.infopathdev.com:443/forums/thread/45610.aspx</link><pubDate>Fri, 07 Aug 2009 14:53:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45610</guid><dc:creator>kalyan@infopath</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45610.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=45610</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Patrick,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; Unfortunately i should not use rules to add rows, because i need to do lot of validations based on code. Sorry to say this. Any idea with code?&lt;/p&gt;&lt;p&gt;&amp;nbsp;Thanks,&lt;/p&gt;&lt;p&gt;Kalyan. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Problem with programatically inserting a row in repeating table.</title><link>https://www.infopathdev.com:443/forums/thread/45502.aspx</link><pubDate>Thu, 06 Aug 2009 00:17:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45502</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45502.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=45502</wfw:commentRss><description>&lt;p&gt;Hi Kalyan,&lt;/p&gt;
&lt;p&gt;We provide qRules to the InfoPath community. qRules does this for you and it&amp;#39;s free. Here&amp;#39;s a link: &lt;a href="http://www.qdabra.com/en/products/qRules.aspx"&gt;http://www.qdabra.com/en/products/qRules.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Problem with programatically inserting a row in repeating table.</title><link>https://www.infopathdev.com:443/forums/thread/45465.aspx</link><pubDate>Wed, 05 Aug 2009 19:25:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45465</guid><dc:creator>kalyan@infopath</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45465.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=45465</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi everybody,&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have a problem with programatically inserting a row in InfoPath repeating table. I have 7 fields in my data source like field1, field2, field3, field4, field5, Copyfield4, Copyfield5. Of these 7 fields first five are in the repeating node and the remaining two are global (like &amp;quot; dfs:myFields/my:Copyfield4”). I am showing only three fields in the repeating table (field1, field2, field3) and the other two are not shown in the repeating table, which are hidden. &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here I am showing Copyfield4, Copyfield5 are under the repeating table, where one is drop down list box and the other is a normal text box. My case is I will enter data into field1, field2, field3 (which are the fields in the repeating table) and Copyfield4, Copyfield5 (which are under the repeating table) and I will click a button in the repeating table. Based on that click I am transferring the data from Copyfield4, Copyfield5 (which are under the repeating table) to field4, field5 (Transferring is working fine). At the same time I am inserting a new and empty row (which will have the same fields as in the first row). &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here my problem is while adding the new row below the current row, hidden fields (field4, field5) of newly entered row are getting data from the above row. If I click the add button with out entering data in Copyfield4, Copyfield5 it should show an error message that these fields are empty. But it wasn&amp;#39;t showing that because the hidden fields are getting the data from the above row. But after inserting the row I am forcing all the fields to nulls. I have some more fields, they are working fine when I make them nulls but only these two are not working. I am getting this repeating node from SAP developers, the only similarity between those fields was both are character fields of size 10. &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am having the problem only with these two fields. One of these two fields is loaded based on the other field (which is somewhere in the form) selection. &lt;br /&gt;&lt;br /&gt;Here is my repeating node, which we got from SAP developers.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;/dfs:myFields/dfs:queryFields/tns: METHOD1/STRUCTURE /item&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (In this XPath item is the repeating node.) &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; My code for adding a new row below the current row is,&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator xFill= MainDataSource.CreateNavigator();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string myNamespace = NamespaceManager.LookupNamespace(&amp;quot;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (XmlWriter writer = MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/tns:METHOD1/STRUCTURE&amp;quot;, NamespaceManager).AppendChild())&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer.WriteStartElement(&amp;quot;item&amp;quot;, myNamespace);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer.WriteElementString(&amp;quot;field1&amp;quot;, myNamespace, &amp;quot;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer.WriteElementString(&amp;quot;field2&amp;quot;, myNamespace, &amp;quot;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer.WriteElementString(&amp;quot;field3&amp;quot;, myNamespace, &amp;quot;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer.WriteElementString(&amp;quot;field4&amp;quot;, myNamespace, &amp;quot;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer.WriteElementString(&amp;quot;field5&amp;quot;, myNamespace, &amp;quot;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer.WriteEndElement();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer.Close();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xFill.SelectSingleNode(&amp;quot;/dfs:myFields/my:Copyfield4&amp;quot;,NamespaceManager).SetValue(&amp;quot;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xFill.SelectSingleNode(&amp;quot;/dfs:myFields/my:Copyfield5&amp;quot;,NamespaceManager).SetValue(&amp;quot;&amp;quot;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;Here i am forcefully clearing all the fields in the repeating table as well as under the repeating table fields.&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This is the code i am using to forcefully make null values of the new row fields using the below two lines in the above code.&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer.WriteElementString(&amp;quot;field4&amp;quot;, myNamespace, &amp;quot;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer.WriteElementString(&amp;quot;field5&amp;quot;, myNamespace, &amp;quot;&amp;quot;);&lt;br /&gt;&lt;br /&gt;Here I am forcefully clearing all the fields under the repeating table with the following two lines in the above code.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xFill.SelectSingleNode(&amp;quot;/dfs:myFields/my:Copyfield4&amp;quot;,NamespaceManager).SetValue(&amp;quot;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xFill.SelectSingleNode(&amp;quot;/dfs:myFields/my:Copyfield5&amp;quot;,NamespaceManager).SetValue(&amp;quot;&amp;quot;);&lt;br /&gt;&lt;br /&gt;Of these above two fields one is dropdown list box and the other is a text box.&amp;nbsp; The field4, field5 are only taking the values from the above row, all the other fields in the repeating table are working fine. I don&amp;#39;t understand what&amp;#39;s wrong with these two fields. They are only taking above rows value if I don’t enter anything in Copyfield4, Copyfield5. If enter any data in Copyfield4 and Copyfield5 its taking the freshly entered data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If I confused u with my scenario I am glad to explain again and again. This is very important for my further form design.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks in Advance,&lt;br /&gt;Kalyan.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>