<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Add row to repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36029.aspx</link><pubDate>Thu, 18 Dec 2008 13:06:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36029</guid><dc:creator>GazM</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36029.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36029</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Try looking at this forum discussion &lt;a href="http://www.infopathdev.com/forums/t/9514.aspx"&gt;http://www.infopathdev.com/forums/t/9514.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Gary&lt;/p&gt;</description></item><item><title>Re: Add row to repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36013.aspx</link><pubDate>Thu, 18 Dec 2008 09:27:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36013</guid><dc:creator>Jimothias</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36013.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36013</wfw:commentRss><description>&lt;p&gt;Frederik&lt;/p&gt;
&lt;p&gt;Thanks for the post but I&amp;#39;m sorry I cant seem to find the &lt;strong&gt;&lt;font color="#800000"&gt;NameNodeInManifest&lt;/font&gt;&lt;/strong&gt;&amp;nbsp;string anywhere in the manifest.xsf&amp;nbsp;file. Sorry to be a pain I&amp;#39;ve only been using Infopath&amp;nbsp;for about 3 months :0(. Also I think that is C# code and in the code editor I have to use VB for some reason?!? Maybe because I dont have VS installed maybe?&lt;/p&gt;
&lt;p&gt;Any pointers would be brilliant :0)&lt;/p&gt;
&lt;p&gt;Thanks again&lt;/p&gt;
&lt;p&gt;James&lt;/p&gt;</description></item><item><title>Re: Add row to repeating table</title><link>https://www.infopathdev.com:443/forums/thread/35933.aspx</link><pubDate>Wed, 17 Dec 2008 17:04:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35933</guid><dc:creator>Frederik Van Lierde</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35933.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35933</wfw:commentRss><description>&lt;font color="#008080" size="2"&gt;
&lt;p&gt;You need to access this Manifest file, the following line shows how to&amp;nbsp;get e newRow node&amp;nbsp;&lt;/p&gt;
&lt;p&gt;XPathNavigator&lt;/font&gt;&lt;font size="2"&gt; xnNode = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.Template.Manifest.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;//xsf:xDocumentClass/xsf:views/xsf:view/xsf:editing/xsf:xmlToEdit[@name=&amp;#39;&lt;strong&gt;NameNodeInManifest&lt;/strong&gt;&amp;#39;]/xsf:editWith/xsf:fragmentToInsert/xsf:chooseFragment/my:&lt;strong&gt;RepeatingNode&lt;/strong&gt;&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager);&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&amp;nbsp;So first you &lt;strong&gt;Save as source file, &lt;/strong&gt;go to the manifest:xsf en try to find the &lt;font color="#800000"&gt;&lt;strong&gt;NameNodeInManifest, &lt;/strong&gt;This will be the nodename with a number&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font color="#800000"&gt;After the first part of the code, append the new structure, when you delete the complete range, InfoPath doesn&amp;#39;t know the structure anymore&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;xnGroupNode.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:expenseReport/my:MyControls&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager).AppendChild(xnNode.InnerXml);&lt;/font&gt;&lt;/p&gt;&lt;font color="#008000" size="2"&gt;
&lt;p&gt;//-- Get the newest appended node --&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;xnNewRow = xn.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:expenseReport/my:MyControls/my:MyControl[last()]&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager);&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;// Add the data to the new row&amp;nbsp;&lt;br /&gt;xnNewRow.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:Source&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager).SetValue(&amp;quot;some data&amp;quot;)&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;Hope this will help you&lt;/p&gt;</description></item><item><title>Add row to repeating table</title><link>https://www.infopathdev.com:443/forums/thread/35931.aspx</link><pubDate>Wed, 17 Dec 2008 16:53:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35931</guid><dc:creator>Jimothias</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35931.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35931</wfw:commentRss><description>&lt;p&gt;Afternoon everyone&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I hope someone can help me, what I&amp;#39;ve got is a repeating table with 2 buttons at the top of the screen. the first button shows the table (by default the repeating table is hidden) the second button hides the table and removes all the rows using this vb code:&lt;/p&gt;
&lt;p&gt;Public Sub ButtonMiscExpensesNo_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)&lt;br /&gt;&lt;br /&gt;&amp;#39; Retrieve a reference to the Main DOM&lt;br /&gt;Dim root As XPathNavigator = MainDataSource.CreateNavigator()&lt;br /&gt;&lt;br /&gt;&amp;#39; Count the amount of group2 nodes&lt;br /&gt;Dim iter As XPathNodeIterator = root.Select( _&lt;br /&gt;&amp;quot;/my:myFields/my:MiscExpensesSection/my:MiscExpenseTable/my:MiscEntertainmentExpenses&amp;quot;, _&lt;br /&gt;NamespaceManager)&lt;br /&gt;Dim group2NodesCount As Integer = iter.Count&lt;br /&gt;&lt;br /&gt;&amp;#39; Retrieve the first group2 node&lt;br /&gt;Dim firstGroup2NodeNav As XPathNavigator = _&lt;br /&gt;root.SelectSingleNode(&amp;quot;/my:myFields/my:MiscExpensesSection/my:MiscExpenseTable/my:MiscEntertainmentExpenses[1]&amp;quot;, _&lt;br /&gt;NamespaceManager)&lt;br /&gt;&amp;#39; Retrieve the last group2 node&lt;br /&gt;&lt;br /&gt;Dim lastGroup2NodeNav As XPathNavigator = _&lt;br /&gt;root.SelectSingleNode(&amp;quot;/my:myFields/my:MiscExpensesSection/my:MiscExpenseTable/my:MiscEntertainmentExpenses[&amp;quot; &amp;amp; _&lt;br /&gt;group2NodesCount.ToString() &amp;amp; &amp;quot;]&amp;quot;, _&lt;br /&gt;NamespaceManager)&lt;br /&gt;&lt;br /&gt;&amp;#39; Delete the range of nodes from the first to the last group2 nodes&lt;br /&gt;firstGroup2NodeNav.DeleteRange(lastGroup2NodeNav)&lt;br /&gt;End Sub&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This hides the table once the rows have been deleted. The reason they get deleted is so the fields are fresh incase the user changes his/her mind again and want to use the repeating table. Does anyone know what code I should add (in VB please) to add a row to the table using the button that shows the table? The code below doesn;t work and complains about incorrect data type and no matter what I try it just fails :0(&lt;/p&gt;
&lt;p&gt;Dim myNamespace As String = NamespaceManager.LookupNamespace(&amp;quot;my&amp;quot;)&lt;br /&gt;Using writer As XmlWriter = MainDataSource.CreateNavigator().SelectSingleNode( _&lt;br /&gt;&amp;quot;/my:myFields/my:MiscExpensesSection/my:MiscExpenseTable&amp;quot;, NamespaceManager).AppendChild()&lt;br /&gt;writer.WriteStartElement(&amp;quot;MiscEntertainmentExpenses&amp;quot;, myNamespace)&lt;br /&gt;writer.WriteElementString(&amp;quot;MiscEntertainmentDate&amp;quot;, myNamespace, &amp;quot;&amp;quot;)&lt;br /&gt;writer.WriteElementString(&amp;quot;MiscEntertainmentExpense&amp;quot;, myNamespace, &amp;quot;&amp;quot;)&lt;br /&gt;writer.WriteElementString(&amp;quot;MiscEntertainmentNet&amp;quot;, myNamespace, &amp;quot;0&amp;quot;)&lt;br /&gt;writer.WriteEndElement()&lt;br /&gt;writer.Close()&lt;br /&gt;End Using&lt;/p&gt;
&lt;p&gt;Any hints or pointers will be appreciated.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advanc&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;James&lt;/p&gt;</description></item></channel></rss>