<?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: Delete rows when checkbox is false</title><link>https://www.infopathdev.com:443/forums/thread/125254.aspx</link><pubDate>Wed, 08 Mar 2023 13:47:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:125254</guid><dc:creator>joubin</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/125254.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=125254</wfw:commentRss><description>quick addition:

I had to put:
[my:Duty != 1 or my:Duty =null]

to cover cases where this strange xsi:nil=&amp;quot;true&amp;quot; exists (so node is not empty or 0 but non existent)</description></item><item><title>Re: Delete rows when checkbox is false</title><link>https://www.infopathdev.com:443/forums/thread/125252.aspx</link><pubDate>Tue, 07 Mar 2023 16:21:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:125252</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/125252.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=125252</wfw:commentRss><description>Ah, cool - so yes, that would depend on your checkbox settings and what you are storing for true / false. Glad you have it working the way you need it to!</description></item><item><title>Re: Delete rows when checkbox is false</title><link>https://www.infopathdev.com:443/forums/thread/125251.aspx</link><pubDate>Tue, 07 Mar 2023 16:14:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:125251</guid><dc:creator>joubin</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/125251.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=125251</wfw:commentRss><description>thanks Hilary, you are a star!

it works, just had to change &amp;#39;true&amp;#39; to &amp;#39;1&amp;#39;. so simple!</description></item><item><title>Re: Delete rows when checkbox is false</title><link>https://www.infopathdev.com:443/forums/thread/125250.aspx</link><pubDate>Tue, 07 Mar 2023 15:27:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:125250</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/125250.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=125250</wfw:commentRss><description>&lt;p&gt;Perfect, thanks. So if you just want to get the rows where the checkbox is not true, you would add an XPath filter to your tableRows selector. &lt;/p&gt;
&lt;p&gt;Let&amp;#39;s pretend the field bound to the checkbox is field3, ok? You could also check that the field = false instead of != true, but I guess I&amp;#39;m assuming any blanks should also be deleted:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;XPathNodeIterator tableRows = domNav.Select(&amp;quot;/my:myFields/my:Invoices_List/my:group6&lt;strong&gt;[my:field3 != &amp;#39;true&amp;#39;]&lt;/strong&gt;&amp;quot;, NamespaceManager);&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Delete rows when checkbox is false</title><link>https://www.infopathdev.com:443/forums/thread/125249.aspx</link><pubDate>Tue, 07 Mar 2023 08:43:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:125249</guid><dc:creator>joubin</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/125249.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=125249</wfw:commentRss><description>Sure. I&amp;#39;m lucky to found an old Win7 machine with IP2010 (VSTA integrated) installed... it is such a hassle with new 2013 and VisualStudio...

currently I have this code, which deletes everything on button click:
&lt;BLOCKQUOTE&gt;&lt;div&gt;
XPathNavigator domNav = MainDataSource.CreateNavigator();
                XPathNodeIterator tableRows = domNav.Select(&amp;quot;/my:myFields/my:Invoices_List/my:group6&amp;quot;, NamespaceManager);
                DialogResult v = MessageBox.Show(&amp;quot;Do you want to erase entire data?&amp;quot;, &amp;quot;Invoices Data Table&amp;quot;, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (v == DialogResult.Yes)
                {
                    if (tableRows.Count &amp;gt; 0)
                    {
                        for (int i = tableRows.Count; i &amp;gt; 0; i--)
                        {
                            XPathNavigator reTable = MainDataSource.CreateNavigator();
                            XPathNavigator reTableRows = reTable.SelectSingleNode(&amp;quot;/my:myFields/my:Invoices_List/my:group6[&amp;quot; + i + &amp;quot;]&amp;quot;, NamespaceManager);
                            reTableRows.DeleteSelf();
                        }
&lt;/div&gt;&lt;/BLOCKQUOTE&gt;</description></item><item><title>Re: Delete rows when checkbox is false</title><link>https://www.infopathdev.com:443/forums/thread/125247.aspx</link><pubDate>Mon, 06 Mar 2023 16:32:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:125247</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/125247.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=125247</wfw:commentRss><description>Can you post your current code? I was trying to set up a test, but it looks like I don&amp;#39;t have my machine set up correctly for adding code to InfoPath at the moment....</description></item><item><title>Delete rows when checkbox is false</title><link>https://www.infopathdev.com:443/forums/thread/125246.aspx</link><pubDate>Mon, 06 Mar 2023 14:44:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:125246</guid><dc:creator>joubin</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/125246.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=125246</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I have a simple requirement, but cannot figure out the code:&lt;/p&gt;&lt;p&gt;having a repeating table with several columns and a &amp;#39;verified&amp;#39; checkbox. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;on button click, delete all rows of a repeating table where the checkbox is not checked, so leaving only the rows with checked boxes. &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>