<?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: Populate repeating table from another view</title><link>https://www.infopathdev.com:443/forums/thread/9309.aspx</link><pubDate>Tue, 14 Mar 2006 11:39:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9309</guid><dc:creator>Abhishek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9309.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9309</wfw:commentRss><description>Hi Shaul,&lt;br /&gt;           I have exactly the same situation as u described above.And I used code to implement this.&lt;br /&gt;&lt;br /&gt;And most importantly,dont bind the controls in the Order view to the repeating table.Keep separate fields to accept Order details in the Order view.&lt;br /&gt;Assume that my datasource has the following structure&lt;br /&gt;Rootnode&lt;br /&gt;    Group&lt;br /&gt;       Repeating Group&lt;br /&gt;&lt;br /&gt;Steps involved&lt;br /&gt;1)On clicking the "Add Order" button,switch views to the Order view.(Use rules)&lt;br /&gt;2)Keep separate fields in the Order view.&lt;br /&gt;3)For the OK button's OnClick event,Add code to add a row to the Orders repeating table with the new details from the Orders view.&lt;br /&gt;Code sample is &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-11-02T09:58:08'");&lt;br /&gt;IXMLDOMNode oTemplateGrp = templateDom.selectSingleNode("/rootnode/group/repeating group");&lt;br /&gt;//Make a copy of ur Repeating Group row.&lt;br /&gt;IXMLDOMNode oTemplateNode = oTemplateGrp.cloneNode(true);&lt;br /&gt;&lt;br /&gt;//Transfer the value from the field in Orders view to the field in ur Cloned node.&lt;br /&gt;oTemplateNode.selectSingleNode("fieldname in the repeating group").text=thisXDocument.DOM.selectSingleNode("XPath of the field in your Order view").nodeTypedValue.ToString();&lt;br /&gt;IXMLDOMNode oGroup1 = thisXDocument.DOM.selectSingleNode("/root node/group");&lt;br /&gt;//Finally append the cloned row to the end of the repeating group&lt;br /&gt;oGroup1.appendChild(oTemplateNode);	&lt;br /&gt;&lt;br /&gt;4)Now switch the view back to the original view from the Orders view using ..&lt;br /&gt;thisXDocument.View.SwitchView("view name");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Abhishek&lt;br /&gt;</description></item><item><title>Populate repeating table from another view</title><link>https://www.infopathdev.com:443/forums/thread/5442.aspx</link><pubDate>Mon, 13 Mar 2006 15:18:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5442</guid><dc:creator>ShaulDar</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5442.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5442</wfw:commentRss><description>Sorry - I posted this last week with a misleading title (Populate repeating table from another FORM).&lt;br /&gt;&lt;br /&gt;I have a repating table, say Orders. I want users to add orders by clicking an "Add Order" button. This will open a new view for filling an order, which could be quite detailed. Upon hitting the OK button on this Order view it should be closed and the data should be added as another row in the repating table on the main view.&lt;br /&gt;&lt;br /&gt;I bound both the repeating table and the control on the Orders form to the same (repeating) schema element. However the default behavior seems to be that a new entry made in the Order form replaces the previous one, i.e. when I close it I still have only one row in the repeating table, with the new order data, instead of having a new row appended. &lt;br /&gt;&lt;br /&gt;How can I do this? Do I need code?&lt;br /&gt;&lt;br /&gt;-- Shaul</description></item></channel></rss>