<?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: Count results of filtered section/table</title><link>https://www.infopathdev.com:443/forums/thread/89581.aspx</link><pubDate>Tue, 07 May 2013 22:58:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:89581</guid><dc:creator>Doreen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/89581.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=89581</wfw:commentRss><description>&lt;p&gt;Desmo, &lt;/p&gt;&lt;p&gt;did you figure this out?&amp;nbsp; I have same question but this thread is so old nobody will likely respond.&lt;/p&gt;</description></item><item><title>Re: Count results of filtered section/table</title><link>https://www.infopathdev.com:443/forums/thread/60899.aspx</link><pubDate>Fri, 29 Oct 2010 18:04:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:60899</guid><dc:creator>Desmo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/60899.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=60899</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;hi sorry to be bumping an old message but I am having difficulty w/ this one - when you say to add a boolean field in the rep. section,&amp;nbsp; what type of function should it be? there&amp;#39;s nothing that seems to evaluate whether or not the field itself is b eing displayed.&amp;nbsp;&amp;nbsp;&amp;nbsp; if it&amp;#39;s default is &amp;quot;false&amp;quot;, what is supposed to make it true so i can count the &amp;quot;trues&amp;quot;? if that makes sense&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Count results of filtered section/table</title><link>https://www.infopathdev.com:443/forums/thread/39750.aspx</link><pubDate>Thu, 19 Mar 2009 20:26:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39750</guid><dc:creator>b.harrison</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39750.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=39750</wfw:commentRss><description>&lt;p&gt;Hi Jimmy,&lt;/p&gt;
&lt;p&gt;I suppose I should have been more clear about my expectations of count().&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve seen this post by Greg before, and use xdExtensions multiple places.&amp;nbsp; They work in rules and filters, but if I try in an expression box I receive the error &amp;quot;Reference to undeclared namespace prefix: &amp;#39;xdExtension&amp;#39;.&amp;quot;&lt;/p&gt;
&lt;p&gt;I was able to use NamedNodeProperty, as you suggested, to perform my calculations.&amp;nbsp; It behaves similarly to an attribute, from what I can tell.&lt;/p&gt;
&lt;p&gt;I set the value in code:&amp;nbsp; XDocument.SetNamedNodeProperty(node, &amp;quot;show&amp;quot;, &amp;quot;false&amp;quot; or &amp;quot;true&amp;quot;)&lt;/p&gt;
&lt;p&gt;Use it to filter:&amp;nbsp; xdXDocument:GetNamedNodeProperty(., &amp;quot;show&amp;quot;, &amp;quot;true&amp;quot;) = &amp;quot;true&amp;quot;&lt;/p&gt;
&lt;p&gt;And also to put the count in an expression box: count(../../my:Deficiencies/my:Deficiency[xdXDocument:GetNamedNodeProperty(., &amp;quot;show&amp;quot;, &amp;quot;true&amp;quot;) = &amp;quot;true&amp;quot;])&lt;/p&gt;
&lt;p&gt;Once again, thank you very much for your help!&lt;/p&gt;</description></item><item><title>Re: Count results of filtered section/table</title><link>https://www.infopathdev.com:443/forums/thread/39743.aspx</link><pubDate>Thu, 19 Mar 2009 17:06:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39743</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39743.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=39743</wfw:commentRss><description>&lt;p&gt;Pardon me for assuming you knew less than you did.&lt;/p&gt;
&lt;p&gt;I think there are ways to get around using that extra boolean field.&amp;nbsp; For example, there is a way to hack the form to allow calling xdExtension functions from rules and (I believe) expression boxes:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/blogs/greg/archive/2004/09/15/Use-Code-to-Determine-a-Rule-Condition.aspx"&gt;http://www.infopathdev.com/blogs/greg/archive/2004/09/15/Use-Code-to-Determine-a-Rule-Condition.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Another option, since you&amp;#39;re already using code anyway, is to &lt;a class="" href="http://msdn.microsoft.com/en-us/library/bb229819.aspx"&gt;set a named node property&lt;/a&gt; on the relevant fields, and then use xdXDocument:GetNamedNodeProperty(,,) in your count() expression.&amp;nbsp; This should enable you perform these counts without adding unwanted fields to your form.&lt;/p&gt;</description></item><item><title>Re: Count results of filtered section/table</title><link>https://www.infopathdev.com:443/forums/thread/39736.aspx</link><pubDate>Thu, 19 Mar 2009 16:25:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39736</guid><dc:creator>b.harrison</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39736.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=39736</wfw:commentRss><description>&lt;p&gt;I understand XPath, count, and that nothing in my data source is actually being modified, and I think the way count() works makes perfect sense and should function no other way (otherwise, how would you truly know the number of items in the data source?).&amp;nbsp; I was just hoping to have the functionality to count the filtered nodes without having to introduce an otherwise unnecessary field into to my schema.&amp;nbsp; And since position() is able to detect this, I thought there may be&amp;nbsp; way with proceeding-sibling or following-sibling or something along those lines to do this.&lt;/p&gt;</description></item><item><title>Re: Count results of filtered section/table</title><link>https://www.infopathdev.com:443/forums/thread/39733.aspx</link><pubDate>Thu, 19 Mar 2009 16:05:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39733</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39733.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=39733</wfw:commentRss><description>&lt;p&gt;I think that once you understand XPath a bit better, you&amp;#39;ll find that there&amp;#39;s really nothing silly about this behavior.&amp;nbsp; When you filter a repeating section, you are only concealing certain rows from the visual representation of the data, not removing nodes from the data itself. The XPath functions are concerned with the contents of your data source, not the current appearance of your InfoPath view.&lt;/p&gt;
&lt;p&gt;Consider this: if you had two repeating sections bound to the same repeating group and filtered on different values, what value would you expect &lt;strong&gt;count(&lt;em&gt;full path to node&lt;/em&gt;)&lt;/strong&gt; to return?&lt;/p&gt;</description></item><item><title>Re: Count results of filtered section/table</title><link>https://www.infopathdev.com:443/forums/thread/39723.aspx</link><pubDate>Thu, 19 Mar 2009 14:17:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39723</guid><dc:creator>b.harrison</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39723.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=39723</wfw:commentRss><description>&lt;p&gt;Thta is exactly the solution I ended up going with a couple days ago.&amp;nbsp; Seems silly that position() can account for this but count() can&amp;#39;t.&amp;nbsp; Oh well.&lt;/p&gt;
&lt;p&gt;Thanks again swatip!&lt;/p&gt;</description></item><item><title>Re: Count results of filtered section/table</title><link>https://www.infopathdev.com:443/forums/thread/39701.aspx</link><pubDate>Thu, 19 Mar 2009 05:16:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39701</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39701.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=39701</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Add a Boolean field to the repeating section in data source with the default value as false. You are using a function which returns true or false. Set that value to the newly added boolean field. &amp;nbsp;Use this field to filter the rows. For example, count(&amp;quot;my:myFields/my:group1/my:group2[my:booleanField = ‘true&amp;#39;]&amp;quot;)&lt;/p&gt;</description></item><item><title>Re: Count results of filtered section/table</title><link>https://www.infopathdev.com:443/forums/thread/39676.aspx</link><pubDate>Wed, 18 Mar 2009 14:01:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39676</guid><dc:creator>b.harrison</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39676.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=39676</wfw:commentRss><description>&lt;p&gt;Hi swathip,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&amp;nbsp; I know the count() function, but it does not give me the result I am looking for.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Say my repeating data source has 12 rows in it.&amp;nbsp; For the repeating section filter in Infopath, I use an xdExtension to call a function that returns true or false, so the filter can include or discard that row.&amp;nbsp; When I have this, 4 rows are shown that make it through the filter.&lt;/p&gt;
&lt;p&gt;If I make an expression box with count(xpath) as you suggested, its value is still 12.&amp;nbsp; However, if I put an expression box with position() in the repeating section, the values shown a 1, 2, 3, and 4.&amp;nbsp; So, the position() function can account for filtered data; I need something similar for count().&amp;nbsp; Any ideas?&lt;/p&gt;</description></item><item><title>Re: Count results of filtered section/table</title><link>https://www.infopathdev.com:443/forums/thread/39660.aspx</link><pubDate>Wed, 18 Mar 2009 09:16:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39660</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39660.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=39660</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Use the count(&amp;quot;repeating section xpath &amp;quot;) function. By using this you can get the number of rows are inserted in repeating section.&lt;/p&gt;</description></item><item><title>Count results of filtered section/table</title><link>https://www.infopathdev.com:443/forums/thread/39636.aspx</link><pubDate>Tue, 17 Mar 2009 19:31:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39636</guid><dc:creator>b.harrison</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39636.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=39636</wfw:commentRss><description>&lt;p&gt;I have a repeating section bound to a repeating field in my data source.&amp;nbsp; When I use the Filter Data functionality to filter, how can I retrieve the number of items that will still be shown?&lt;/p&gt;
&lt;p&gt;Thanks for any help.&lt;/p&gt;</description></item></channel></rss>