<?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: Programmatically triggering Repeating table insert</title><link>https://www.infopathdev.com:443/forums/thread/13317.aspx</link><pubDate>Fri, 01 Jul 2005 14:00:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13317</guid><dc:creator>ScottAtRVC</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13317.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13317</wfw:commentRss><description>Hi Greg.&lt;br /&gt;&lt;br /&gt;I seem to have hit a problem actually.&lt;br /&gt;&lt;br /&gt;The code thisXDocument.View.ExecuteAction("xCollection::insert", "group4_6");  did the trick on the form.&lt;br /&gt;With all this working, I moved the layout of the form about, which includes sections.&lt;br /&gt;And from now on the ExecuteAction method is failing with the error;&lt;br /&gt;&lt;b&gt;The specified bstrAction value for the View.ExecuteAction call is not applicable for the current selection.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I see from MSDN;&lt;br /&gt;&lt;i&gt;the ExecuteAction method of the View object is used to insert data using the xCollection editing component, based on the selected context&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Am i correct that selected context means, what node is currently selected on the form?&lt;br /&gt;Because what confuses me about this is ... what if i have no nodes in my repeating table.  How can i select this to perform the ExecuteAction?&lt;br /&gt;&lt;br /&gt;I think to summarise i am asking if you could explain the limitations to using ExecuteAction?  By this i mean, say ExecuteAction for inserting a new record in a repeating table is being triggered from the OnAfterChanged event of a text box.  Can the text box be located anywhere within the form Data Source / can the text box event just call ExecuteAction / what if the repeating table has no rows?&lt;br /&gt;&lt;br /&gt;Thanks again.  Scott.</description></item><item><title>Re: Programmatically triggering Repeating table insert</title><link>https://www.infopathdev.com:443/forums/thread/13316.aspx</link><pubDate>Fri, 01 Jul 2005 08:12:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13316</guid><dc:creator>ScottAtRVC</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13316.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13316</wfw:commentRss><description>Hi Greg.&lt;br /&gt;&lt;br /&gt;Thanks so much.  thisXDocument.View.ExecuteAction("xCollection::insert", "group4_6");&lt;br /&gt;Did the trick.&lt;br /&gt;&lt;br /&gt;Cheers.  Scott.</description></item><item><title>Re: Programmatically triggering Repeating table insert</title><link>https://www.infopathdev.com:443/forums/thread/13315.aspx</link><pubDate>Thu, 30 Jun 2005 19:55:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13315</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13315.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13315</wfw:commentRss><description>Look up the ExecuteAction() method in the help file. This is what you want to use. You will need to pay special attention to the portions about SelectNodes or SelectText. These are important.&lt;br /&gt;&lt;br /&gt;If you can't locate your help files, take a look here:&lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/downloads/free/default.aspx?s=Help%20Files&gt;http://www.infopathdev.com/downloads/free/default.aspx?s=Help%20Files&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]&lt;br /&gt;InfoPath Dev</description></item><item><title>Programmatically triggering Repeating table insert</title><link>https://www.infopathdev.com:443/forums/thread/12480.aspx</link><pubDate>Thu, 30 Jun 2005 15:58:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12480</guid><dc:creator>ScottAtRVC</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12480.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12480</wfw:commentRss><description>Hi All.&lt;br /&gt;&lt;br /&gt;I currently have a repeating table which only allows the user to delete a row by the button control within the row NOT the built in InfoPath repeating table functionality.&lt;br /&gt;&lt;br /&gt;New rows are created programmatically by cloning the first row in the repeating table.&lt;br /&gt;&lt;br /&gt;However, I have now realised this is not the best solution because should the users delete all the rows, the programmatic inserting of a new row fails because there is no row to clone.&lt;br /&gt;&lt;br /&gt;Now using the build in InfoPath tools, a user can delete all the rows.  Then press the insert new tab / button and a new row is created.&lt;br /&gt;&lt;br /&gt;So my question is how can I programmatically mimic the insert new row InfoPath functionality?&lt;br /&gt;&lt;br /&gt;Cheers.  Scott.</description></item></channel></rss>