<?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>Controls</title><link>https://www.infopathdev.com:443/forums/43.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Using a Checkbox in a calculation?</title><link>https://www.infopathdev.com:443/forums/thread/42978.aspx</link><pubDate>Mon, 15 Jun 2009 23:27:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42978</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42978.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=42978</wfw:commentRss><description>&lt;p&gt;Try putting @ApplyVAT into another set of parenthesis. I know for conditional defaults when I want a boolean expression to evaluate to 1 or 0, I have to use more parenthesis. So, like:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sum(@InvoiceAmount * (@ApplyVAT))&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Using a Checkbox in a calculation?</title><link>https://www.infopathdev.com:443/forums/thread/42976.aspx</link><pubDate>Mon, 15 Jun 2009 23:02:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42976</guid><dc:creator>djj66</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42976.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=42976</wfw:commentRss><description>&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;Does anyone know how to use the value from a checkbox on an InfoPath form as either 1 or 0 (ie True = 1, False = 0)&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to do this in a repeating table, where the user will type in a&amp;nbsp;value (eg an invoice amount) and then to the right of that set the check box = true if VAT should be added, or False if VAT is not applicable.&amp;nbsp; That part is easy. &amp;nbsp;But at the bottom of the table I want to do a sum, something like sum(@InvoiceAmount * @ApplyVAT)&amp;nbsp;&amp;nbsp; (ie to sum all the values where VAT should be added)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;In my example here @invoiceamount is a decimal, and @ApplyVAT is a checkbox. My sum doesn&amp;#39;t work at the moment, because InfoPath doesn&amp;#39;t treat Checkboxes as 1 or 0&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried various functions, such as EVAL, Boolean, but can&amp;#39;t get this working.&lt;/p&gt;
&lt;p&gt;If&amp;nbsp;I need code, I&amp;#39;m&amp;nbsp;using&amp;nbsp;VBScript in InfoPath 2003.&lt;/p&gt;
&lt;p&gt;Many thanks in advance,&lt;/p&gt;
&lt;p&gt;David&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>