<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Logical AND Operator</title><link>https://www.infopathdev.com:443/forums/thread/94852.aspx</link><pubDate>Thu, 19 Dec 2013 15:31:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:94852</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/94852.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=94852</wfw:commentRss><description>&lt;p&gt;Hooray! so what that XPath says is:&lt;/p&gt;
&lt;p&gt;Count the instances of the group2 node where inside that node both of these fields are equal to yes.&lt;/p&gt;</description></item><item><title>Re: Logical AND Operator</title><link>https://www.infopathdev.com:443/forums/thread/94851.aspx</link><pubDate>Thu, 19 Dec 2013 15:20:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:94851</guid><dc:creator>jedlo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/94851.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=94851</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;That worked!  Thanks for your help!&lt;/p&gt;</description></item><item><title>Re: Logical AND Operator</title><link>https://www.infopathdev.com:443/forums/thread/94850.aspx</link><pubDate>Thu, 19 Dec 2013 15:13:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:94850</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/94850.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=94850</wfw:commentRss><description>&lt;p&gt;Try this - I&amp;#39;m assuming you picked your fields with the field picker so the ../my:group1/my:group2 relative path is correct:&lt;/p&gt;
&lt;p&gt;count(../my:group1/my:group2[my:dataMSM = &amp;quot;yes&amp;quot; and my:dataTested = &amp;quot;yes&amp;quot;])&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Logical AND Operator</title><link>https://www.infopathdev.com:443/forums/thread/94849.aspx</link><pubDate>Thu, 19 Dec 2013 15:06:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:94849</guid><dc:creator>jedlo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/94849.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=94849</wfw:commentRss><description>&lt;p&gt;Thanks for the reply Hilary.  I tried building a new formula from your example, but didn&amp;#39;t have much luck.   Here is the full XPath from one of my previous attempts:&lt;/p&gt;&lt;p&gt;&amp;nbsp;count(../my:group1/my:group2/my:dataMSM = &amp;quot;yes&amp;quot; and ../my:group1/my:group2/my:dataTested = &amp;quot;yes&amp;quot;)&amp;nbsp;&lt;/p&gt;&lt;p&gt;This throws the error: &amp;quot;Argument 1 must return a node-set.&amp;quot;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Logical AND Operator</title><link>https://www.infopathdev.com:443/forums/thread/94834.aspx</link><pubDate>Thu, 19 Dec 2013 02:01:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:94834</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/94834.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=94834</wfw:commentRss><description>&lt;p&gt;Is this the full XPath? Can you check the Edit XPath box in the formula editor?&lt;/p&gt;
&lt;p&gt;At any rate, I&amp;#39;d think you want to count the rows where the values are true - without knowing the XPath to your nodes, I have to make something up here, but I&amp;#39;d expect something like:&lt;/p&gt;
&lt;p&gt;count(groups/group[dataMSM = &amp;#39;yes&amp;#39; and dataTested = &amp;#39;yes&amp;#39;])&lt;/p&gt;
&lt;p&gt;So, in the formula editor, select the repeating group. Add a filter, and the filter would be that dataMSM is yes and dataTested is yes - does that make sense?&lt;/p&gt;</description></item><item><title>Logical AND Operator</title><link>https://www.infopathdev.com:443/forums/thread/94826.aspx</link><pubDate>Wed, 18 Dec 2013 19:38:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:94826</guid><dc:creator>jedlo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/94826.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=94826</wfw:commentRss><description>I have a form that uses a repeating group, and a totals section to tally selections in the repeating group rows.  For example, the repeating group has two check boxes, dataMSM and dataTested.  Above the repeating group, there are three fields totalMSM, totalMSMTested and totalTested.  The totalMSM and totalTested fields are set to increment like this:
&lt;br /&gt;&lt;br /&gt;
count(dataMSM[. = &amp;quot;yes&amp;quot;])&lt;br /&gt;
count(dataTested[. = &amp;quot;yes&amp;quot;])
&lt;br /&gt;&lt;br /&gt;
These both work perfectly.  Each time a row is added and these check boxes are checked, the correct fields increment by one.  However, the totalMSMTested field should only increment if both dataMSM AND dataTested are checked.  I&amp;#39;ve tried the following and each fails the validation:
&lt;br /&gt;&lt;br /&gt;
count(dataMSM[. = &amp;quot;yes&amp;quot;] and dataTested[. = &amp;quot;yes&amp;quot;])&lt;br /&gt;
count((dataMSM and dataTested)[. = &amp;quot;yes&amp;quot;])&lt;br /&gt;
count(((dataMSM) and (dataTested))[. = &amp;quot;yes&amp;quot;])&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Any ideas on how I can get the totalMSMTested field to increment only if both dataMSM AND dataTested are checked?
&lt;br /&gt;&lt;br /&gt;
Thanks!</description></item></channel></rss>