<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Number function logic</title><link>https://www.infopathdev.com:443/forums/thread/76540.aspx</link><pubDate>Fri, 16 Mar 2012 15:07:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76540</guid><dc:creator>rdrnnr</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76540.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=76540</wfw:commentRss><description>&lt;p&gt;Actually, your previous post logic worked (I missed a bracket) however, the end result didn&amp;#39;t work.&amp;nbsp; If they have 4 discrepancies, their inspection score shouldn&amp;#39;t equal 100%.&amp;nbsp; So, instead of them equaling Discrepancy or Finding, I switched it to Compliant and works like a charm!&amp;nbsp; Thank you!&lt;/p&gt;</description></item><item><title>Re: Number function logic</title><link>https://www.infopathdev.com:443/forums/thread/76535.aspx</link><pubDate>Fri, 16 Mar 2012 14:25:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76535</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76535.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=76535</wfw:commentRss><description>&lt;p&gt;No, resp will only equal the value it has.&amp;nbsp; You can&amp;#39;t assign it a new one mid-formula.&amp;nbsp; This would work for obtaining a 1 when resp has one of those values and 0 if not:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; number(boolean(resp1[. = &amp;quot;Discrepancy&amp;quot; or . = &amp;quot;Finding&amp;quot;]))&lt;/p&gt;&lt;p&gt;but that&amp;#39;s pretty verbose.&amp;nbsp; The approach in my previous post is probably the concisest and should work.&amp;nbsp; Could you post the exact formula that&amp;#39;s giving you the error (with Show XPath selected)?&lt;/p&gt;</description></item><item><title>Re: Number function logic</title><link>https://www.infopathdev.com:443/forums/thread/76522.aspx</link><pubDate>Thu, 15 Mar 2012 21:11:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76522</guid><dc:creator>rdrnnr</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76522.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=76522</wfw:commentRss><description>&lt;p&gt;I tried your expression and came back with an error:&amp;nbsp; Node-test expected.&amp;nbsp;&amp;nbsp; I tried substituting &amp;quot;sum&amp;quot; and came back with same error&lt;/p&gt;
&lt;p&gt;doesn&amp;#39;t resp = 1 because I&amp;#39;m telling it to after the ] ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Number function logic</title><link>https://www.infopathdev.com:443/forums/thread/76520.aspx</link><pubDate>Thu, 15 Mar 2012 20:35:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76520</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76520.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=76520</wfw:commentRss><description>&lt;p&gt;The expression &lt;strong&gt;resp1[. = &amp;quot;Discrepancy&amp;quot; or . = &amp;quot;Finding&amp;quot;] = 1&lt;/strong&gt; will evaluate to 1 if resp1&amp;nbsp;is equal to 1 and 0 if resp1 is equal to 0, but since resp1 will never have the value &amp;quot;1&amp;quot;, this will always evaluate to 0.&lt;/p&gt;&lt;p&gt;&amp;nbsp;How about this expression:&lt;/p&gt;&lt;p&gt;count((resp1 | resp2 | resp3 | resp4)[. = &amp;#39;Discrepancy&amp;#39; or . = &amp;#39;Finding&amp;#39;]) / 4&lt;/p&gt;</description></item><item><title>Number function logic</title><link>https://www.infopathdev.com:443/forums/thread/76518.aspx</link><pubDate>Thu, 15 Mar 2012 20:04:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76518</guid><dc:creator>rdrnnr</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76518.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=76518</wfw:commentRss><description>&lt;p&gt;I now have gray hair! ha&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been trying to create a checklist to conduct inspections.&amp;nbsp; I need to come up with a way to add all the number of &amp;quot;discrepancy&amp;quot; and &amp;quot;findings&amp;quot; (chosen from a drop down list) into a final overall score.&amp;nbsp; I have each of these &amp;quot;values&amp;quot; to read as &amp;quot;discrepancy&amp;quot; and &amp;quot;findings&amp;quot; in their drop down boxes.&amp;nbsp; In my &amp;quot;score&amp;quot; control, I have the following under function:&lt;/p&gt;
&lt;p&gt;number(resp1[. = &amp;quot;Discrepancy&amp;quot; or . = &amp;quot;Finding&amp;quot;] = 1) + number(resp2[. = &amp;quot;Discrepancy&amp;quot; or . = &amp;quot;Finding&amp;quot;] = 1) + number(resp3[. = &amp;quot;Discrepancy&amp;quot; or . = &amp;quot;Finding&amp;quot;] = 1) + number(resp4[. = &amp;quot;Discrepancy&amp;quot; or . = &amp;quot;Finding&amp;quot;] = 1) / 4&lt;/p&gt;
&lt;p&gt;so each time either &amp;quot;discrepancy&amp;quot; or &amp;quot;finding&amp;quot; is clicked, it should count as one and the final total be divided by the number of questions.&amp;nbsp; The score box is set up for a double decimal, percentage&amp;nbsp;but regardless of what is checked on the drop down boxes, a zero displays in the score box. &lt;/p&gt;
&lt;p&gt;What am I missing?&amp;nbsp; Please help!&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Thank you in advance.&lt;/p&gt;</description></item></channel></rss>