<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Code to add rows at the end of repeating table</title><link>https://www.infopathdev.com:443/forums/thread/8216.aspx</link><pubDate>Tue, 15 Nov 2005 16:26:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8216</guid><dc:creator>franck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8216.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8216</wfw:commentRss><description>You are welcome.&lt;br /&gt;&lt;br /&gt;Good luck with your InfoPath Developments.  Don't hesitate to come back and to open a new thread if you have any other issue.</description></item><item><title>Re: Code to add rows at the end of repeating table</title><link>https://www.infopathdev.com:443/forums/thread/8215.aspx</link><pubDate>Tue, 15 Nov 2005 15:50:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8215</guid><dc:creator>Abhishek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8215.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8215</wfw:commentRss><description>Thank you very very much Frank.&lt;br /&gt;&lt;br /&gt;Something had gone wrong with my schema.Becoz I deleted the groups and fields and added the same thing again and it worked.&lt;br /&gt;And I really dont know as to how something can go wrong with my schema without me doing anything to it.&lt;br /&gt;&lt;br /&gt;Anyway thank u very much.&lt;br /&gt;U guys make a lot of guys like me happy by providing solutions.&lt;br /&gt;Just cant tell u how releived I am.&lt;br /&gt;regards,&lt;br /&gt;Abhishek</description></item><item><title>Re: Code to add rows at the end of repeating table</title><link>https://www.infopathdev.com:443/forums/thread/8214.aspx</link><pubDate>Mon, 14 Nov 2005 14:35:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8214</guid><dc:creator>franck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8214.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8214</wfw:commentRss><description>Hi Abhishek,&lt;br /&gt;&lt;br /&gt;Something may be wrong with your schema.  To check that it is working:&lt;br /&gt;- Create a new blank form.&lt;br /&gt;- Drag-n-Drop a Repeating Section (from your "Controls" Task Pane) on your main View.&lt;br /&gt;- Inside the repeating section, Drag-n-Drop 1 textboxe&lt;br /&gt;You should have:&lt;br /&gt;myFields&lt;br /&gt; group1&lt;br /&gt;   group2 &amp;lt;-- repeating&lt;br /&gt;     field1&lt;br /&gt;&lt;br /&gt;Use the code that I posted (make sure to update the namespace).  It will work.  &lt;br /&gt;Now, compare the schema of that form with your.&lt;br /&gt;&lt;br /&gt;Now, you can't replace the template by the DOM as you described at the end of your post.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Franck Dauché</description></item><item><title>Re: Code to add rows at the end of repeating table</title><link>https://www.infopathdev.com:443/forums/thread/8213.aspx</link><pubDate>Mon, 14 Nov 2005 06:08:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8213</guid><dc:creator>Abhishek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8213.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8213</wfw:commentRss><description>Thank you very much guys.But I have a problem when using the same code as the one given by Frank&lt;hr noshade size="1"&gt;&lt;hr noshade size="1"&gt;&lt;br /&gt;&lt;font color="red"&gt;Case1&lt;/font id="red"&gt;&lt;br /&gt;The structure of my data source is as follows&lt;br /&gt;&lt;br /&gt;--PR_Form //root&lt;br /&gt;     --Executers //This is a group&lt;br /&gt;            --Approvers //This is a group&lt;br /&gt;                ---Approver //This is a &lt;font color="red"&gt;repeating&lt;/font id="red"&gt; group&lt;br /&gt;                     --- ApproverName //Field&lt;br /&gt;&lt;br /&gt;Now in the onclick event if I write the code given by Franck as follows..&lt;br /&gt;&lt;font color="blue"&gt;IXMLDOMDocument2 templateDom = (IXMLDOMDocument2)thisXDocument.CreateDOM();&lt;br /&gt;&lt;br /&gt;templateDom.validateOnParse = false;&lt;br /&gt;templateDom.load("template.xml");&lt;br /&gt;				&lt;br /&gt;templateDom.setProperty("SelectionNamespaces", "xmlns:my='http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-11-02T09:58:08'");&lt;br /&gt;&lt;br /&gt;IXMLDOMNode oTemplateGrp = templateDom.selectSingleNode("/my:PR_Form/my:Executers/my:Approvers/my:Approver");&lt;br /&gt;				&lt;br /&gt;IXMLDOMNode oTemplateNode = oTemplateGrp.cloneNode(true);&lt;br /&gt;				&lt;br /&gt;IXMLDOMNode oGroup1 = thisXDocument.DOM.selectSingleNode("/my:PR_Form/my:Executers/my:Approvers");&lt;br /&gt;				&lt;br /&gt;oGroup1.appendChild(oTemplateNode);&lt;/font id="blue"&gt;&lt;br /&gt;But when debugging,after the last line i.e &lt;font color="red"&gt;"oGroup1.appendChild(oTemplateNode);"&lt;/font id="red"&gt;,&lt;br /&gt;Infopath throws an error stating &lt;br /&gt;&lt;font color="red"&gt;&lt;br /&gt;System.Runtime.InteropServices.COMException&lt;br /&gt;Element '&lt;a target="_blank" href=http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-11-02T09:58:08}Approver'&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-11-02T09:58:08}Approver'&lt;/a&gt; is unexpected according to content model of parent element '&lt;a target="_blank" href=http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-11-02T09:58:08}Approvers'.&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-11-02T09:58:08}Approvers'.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMNode.appendChild(IXMLDOMNode newChild)&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust.DOMNodeWrapper.appendChild(IXMLDOMNode newChild)&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust.DOMNodeWrapper.appendChild(IXMLDOMNode newChild)&lt;br /&gt;   at PR_Automation.PR_Automation.CTRL16_40_OnClick(DocActionEvent e) in e:\1pr_automation\pr_automation\formcode.cs:line 123&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)&lt;br /&gt;&lt;/font id="red"&gt;&lt;br /&gt;&lt;br /&gt;Out of curiosity,I used "templateDom.selectSingleNode" instead of "thisXDocument.Dom.selectSingleNode"  when creating the oGroup1 node.Surprisingly  Infopath did not throw the error nor did I get the desired results.&lt;br /&gt;So I think its got something to do with setting namespace or some thing like that.&lt;br /&gt;Need ur help guys.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Abhishek</description></item><item><title>Re: Code to add rows at the end of repeating table</title><link>https://www.infopathdev.com:443/forums/thread/8212.aspx</link><pubDate>Sun, 13 Nov 2005 18:08:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8212</guid><dc:creator>franck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8212.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8212</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;Here is a C# sample is you need managed code instead:&lt;br /&gt;&lt;br /&gt;IXMLDOMDocument2 templateDom = (IXMLDOMDocument2)thisXDocument.CreateDOM();&lt;br /&gt;templateDom.validateOnParse = false;&lt;br /&gt;templateDom.load("template.xml");&lt;br /&gt;templateDom.setProperty("SelectionNamespaces", "xmlns:my='http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-10-10T17-59-19'");&lt;br /&gt;IXMLDOMNode oTemplateGrp = templateDom.selectSingleNode("/my:myFields/my:group1/my:group2");&lt;br /&gt;IXMLDOMNode oTemplateNode = oTemplateGrp.cloneNode(true);&lt;br /&gt;IXMLDOMNode oGroup1 = thisXDocument.DOM.selectSingleNode("/my:myFields/my:group1");&lt;br /&gt;oGroup1.appendChild(oTemplateNode);&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Franck Dauché</description></item><item><title>Re: Code to add rows at the end of repeating table</title><link>https://www.infopathdev.com:443/forums/thread/8211.aspx</link><pubDate>Sun, 13 Nov 2005 14:48:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8211</guid><dc:creator>vt_asparagus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8211.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8211</wfw:commentRss><description>This is in VBScript but you can translate it pretty easily to whatever language.&lt;br /&gt;&lt;br /&gt;For sXML pass in an XML string for the group item like:&lt;br /&gt;&lt;br /&gt;sXML = "&amp;lt;Approver&amp;gt;&amp;lt;fname&amp;gt;&amp;lt;/fname&amp;gt;&amp;lt;lname&amp;gt;&amp;lt;/lname&amp;gt;&amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&amp;lt;/Approver&amp;gt;"&lt;br /&gt;&lt;br /&gt;For sParentNodePath pass in the XPath string for the Approver repeating group.&lt;br /&gt;&lt;br /&gt;sParentNodePath = "//my:Approvers"&lt;br /&gt;&lt;br /&gt;Sub CreateRow(sXML, sParentNodePath)&lt;br /&gt;	&lt;br /&gt;	'Create a new row&lt;br /&gt;	dim oXml &lt;br /&gt;	set oXml = XDocument.CreateDOM()&lt;br /&gt;	oXml.async = false&lt;br /&gt;	oXml.loadXML(sXML)&lt;br /&gt;	&lt;br /&gt;	'add the row to the DOM&lt;br /&gt;	XDocument.DOM.selectSingleNode(sParentNodePath).appendChild(oXml.documentElement)&lt;br /&gt;	&lt;br /&gt;End Sub</description></item><item><title>Code to add rows at the end of repeating table</title><link>https://www.infopathdev.com:443/forums/thread/5097.aspx</link><pubDate>Sun, 13 Nov 2005 14:34:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5097</guid><dc:creator>Abhishek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5097.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5097</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;I have a repeating table that is used to capture the list of approvers who approve the form in the work flow.&lt;br /&gt;So when each approver selects his superior,I need to add the superior name to this repeating table.&lt;br /&gt;&lt;br /&gt;I need a code sample to append a row at the bottom of the repeating table which already contains some number of rows.&lt;br /&gt;&lt;br /&gt;Any help greatly appreciated.&lt;br /&gt;&lt;br /&gt;regards,&lt;br /&gt;Abhishek.</description></item></channel></rss>