<?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: Inserting into Repeating Table Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/6705.aspx</link><pubDate>Fri, 10 Mar 2006 10:04:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6705</guid><dc:creator>vasanthaprabu</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6705.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6705</wfw:commentRss><description>No Problem I got it.&lt;br /&gt;&lt;br /&gt;  I have to remove one extra group name thats all.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Vasanth.</description></item><item><title>Re: Inserting into Repeating Table Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/6704.aspx</link><pubDate>Fri, 10 Mar 2006 09:59:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6704</guid><dc:creator>vasanthaprabu</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6704.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6704</wfw:commentRss><description>Hello Agni,&lt;br /&gt;&lt;br /&gt; Here is my Code:&lt;br /&gt;&lt;br /&gt;[InfoPathEventHandler(MatchPath="btnShow", EventType=InfoPathEventType.OnClick)]&lt;br /&gt;		public void btnShow_OnClick(DocActionEvent e)&lt;br /&gt;		{&lt;br /&gt;			try&lt;br /&gt;			{&lt;br /&gt;				string RepeatingXML = "&amp;lt;my:XMLTable xmlns:my='http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-03-10T08-06-14'&amp;gt;&amp;lt;my:Username&amp;gt;Vasanth&amp;lt;/my:Username&amp;gt;&amp;lt;my:Age&amp;gt;23&amp;lt;/my:Age&amp;gt;&amp;lt;my:City&amp;gt;Bangalore&amp;lt;/my:City&amp;gt;&amp;lt;/my:XMLTable&amp;gt;";&lt;br /&gt;&lt;br /&gt;				IXMLDOMDocument oXML = thisXDocument.CreateDOM();&lt;br /&gt;				oXML.async = false;&lt;br /&gt;				oXML.loadXML(RepeatingXML);&lt;br /&gt;&lt;br /&gt;				IXMLDOMNode ParentTable = thisXDocument.DOM.selectSingleNode("my:myFields/my:XMLView/my:XMLTable");&lt;br /&gt;&lt;br /&gt;				ParentTable.appendChild(oXML.documentElement);&lt;br /&gt;			}&lt;br /&gt;			catch(Exception ex)&lt;br /&gt;			{&lt;br /&gt;				ErrorMsg.text = ex.Message;&lt;br /&gt;			}&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;But its not working porperly... &lt;br /&gt;&lt;br /&gt;Error is:  &lt;br /&gt;&lt;br /&gt;Element '&lt;a target="_blank" href=http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-03-10T08-06-14}XMLTable'&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-03-10T08-06-14}XMLTable'&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/2006-03-10T08-06-14}XMLTable'.&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-03-10T08-06-14}XMLTable'.&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Can you please help me!&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;vasanth.</description></item><item><title>Re: Inserting into Repeating Table Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/6703.aspx</link><pubDate>Sun, 17 Apr 2005 04:59:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6703</guid><dc:creator>potpourri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6703.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6703</wfw:commentRss><description>hihihi&lt;br /&gt;&lt;br /&gt;yeah it works now.&lt;br /&gt;super duper thanks for this...saved me a lot of trouble, really! :D</description></item><item><title>Re: Inserting into Repeating Table Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/6702.aspx</link><pubDate>Fri, 15 Apr 2005 08:09:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6702</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6702.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6702</wfw:commentRss><description>It looks like your XML has a prefix of "my" so you need to add "my" as a prefix to your XML string also. And one more thing you need to take care of is "CASE of the letters in the XML nodes and starting and end tags". Try the following xml string it might help you&lt;br /&gt;&lt;br /&gt;var sRepeatingXml = "&amp;lt;my:LogEntries xmlns:my='http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-03-04T02:16:49'&amp;gt;&amp;lt;my:name&amp;gt;NameValue&amp;lt;/my:name&amp;gt;&amp;lt;my:age&amp;gt;Agevalue&amp;lt;/my:age&amp;gt;&amp;lt;my:LogEntries&amp;gt;";&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfopathDev India</description></item><item><title>Re: Inserting into Repeating Table Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/6701.aspx</link><pubDate>Fri, 15 Apr 2005 02:57:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6701</guid><dc:creator>potpourri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6701.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6701</wfw:commentRss><description>Hi Agni,&lt;br /&gt;thanks for the reply.&lt;br /&gt;&lt;br /&gt;I've included the code you gave me, but it throws me an error saying something that the element "LogEntries" entered is not as infopath expected due to the namespace naming difference i suppose, even after I setProperty("SelectionNamespaces",...).&lt;br /&gt;&lt;br /&gt;The error specified that the parentnode (logGroup) is with a certain namespace and thus expecting "LogEntries" to have the same namespace.&lt;br /&gt;&lt;br /&gt;Any idea anyone? :(&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------&lt;br /&gt;//write get the XML of repeating node into a string&lt;br /&gt;var sRepeatingXml = "&amp;lt;LogEntries&amp;gt;&amp;lt;name&amp;gt;NameValue&amp;lt;name&amp;gt;&amp;lt;age&amp;gt;Agevalue&amp;lt;/age&amp;gt;&amp;lt;LogEntries&amp;gt;";&lt;br /&gt;&lt;br /&gt;//create a Dom for the XMLNode&lt;br /&gt;var oXml = XDocument.CreateDOM();&lt;br /&gt;&lt;br /&gt;oXml.async = false;&lt;br /&gt;oXml.loadXML(sRepeatingXml);&lt;br /&gt;oXml.setProperty("SelectionNamespaces", "xmlns:my='http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-03-04T02:16:49'");&lt;br /&gt;&lt;br /&gt;//Get the Parent of the repeating table&lt;br /&gt;var parentofRepeatingNode = XDocument.DOM.selectSingleNode("/my:myFields/my:logGroup");&lt;br /&gt;&lt;br /&gt;//append the repeating XML Element to the Parent node&lt;br /&gt;parentofRepeatingNode.appendChild(oXml.documentElement);&lt;br /&gt;--------------------------------------------------------------------------</description></item><item><title>Re: Inserting into Repeating Table Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/6700.aspx</link><pubDate>Thu, 14 Apr 2005 19:41:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6700</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6700.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6700</wfw:commentRss><description>Here is one way of adding a new row to the repeating table.&lt;br /&gt;&lt;br /&gt;//write get the XML of repeating node into a string &lt;br /&gt;string sRepeatingXml = "&amp;lt;LogEntries&amp;gt;&amp;lt;name&amp;gt;NameValue&amp;lt;name&amp;gt;&amp;lt;age&amp;gt;Agevalue&amp;lt;/age&amp;gt;&amp;lt;LogEntries&amp;gt;";&lt;br /&gt;&lt;br /&gt;//create a Dom for the XMLNode&lt;br /&gt;IXMLDOMDocument oXml = thisXDocument.CreateDOM();&lt;br /&gt;oXml.async = false;&lt;br /&gt;oXml.loadXML(sRepeatingXml);&lt;br /&gt;&lt;br /&gt;//Get the Parent of the repeating table&lt;br /&gt;ixmldomNode parentofRepeatingNode =  getNode("logGroup/logEntries");&lt;br /&gt;&lt;br /&gt;//append the repeating XML Element to the Parent node&lt;br /&gt;parentofRepeatingNode.appendChild(oXml.documentElement);&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfopathDev India</description></item><item><title>Re: Inserting into Repeating Table Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/6699.aspx</link><pubDate>Thu, 14 Apr 2005 09:26:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6699</guid><dc:creator>potpourri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6699.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6699</wfw:commentRss><description>oh yeah forgot to mention, i realised i need to use:&lt;br /&gt;&lt;br /&gt;XDocument.View.ExecuteAction("xCollection::insert", "&amp;lt;table_name&amp;gt;");&lt;br /&gt;&lt;br /&gt;but where/when to specify the field values to be inserted?</description></item><item><title>Inserting into Repeating Table Programmatically</title><link>https://www.infopathdev.com:443/forums/thread/4624.aspx</link><pubDate>Thu, 14 Apr 2005 07:34:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4624</guid><dc:creator>potpourri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4624.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4624</wfw:commentRss><description>&lt;br /&gt;Let say I have the following data source structure:&lt;br /&gt;1. myFields&lt;br /&gt;1.1 logGroup&lt;br /&gt;1.1.1 logEntries (the repeating table)&lt;br /&gt;1.1.1.1 name (the 1st field in the repeating table)&lt;br /&gt;1.1.1.2 age (the 2nd field in the repeating table)&lt;br /&gt;&lt;br /&gt;Does anyone know how to insert a row programmatically into a repeating table, such that each row to be inserted into repeating table logEntries contain the field "name" and "age" ?&lt;br /&gt;&lt;br /&gt;thank you :)</description></item></channel></rss>