<?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: Better ways to get a checkbox value?</title><link>https://www.infopathdev.com:443/forums/thread/29562.aspx</link><pubDate>Fri, 20 Jun 2008 23:13:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29562</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29562.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=29562</wfw:commentRss><description>&lt;p&gt;You will need to either cast it or write a small conversion function which returns a true boolean value. The problem is that if you are not in control of the form, then you could be getting anything back from a check box.... red/blue, yes/no, up/down, 1/0, light/dark, whatever!&lt;/p&gt;
&lt;p&gt;If you are specifically in control of the form, and your not going to mess up existing data, then I suggest that you always set your check boxes to use the values you prefer. Writing a conversion function could be useful because you can keep adding pairs to compare in there.&lt;/p&gt;</description></item><item><title>Better ways to get a checkbox value?</title><link>https://www.infopathdev.com:443/forums/thread/29482.aspx</link><pubDate>Wed, 18 Jun 2008 19:36:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29482</guid><dc:creator>marcdeb</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29482.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=29482</wfw:commentRss><description>&lt;p&gt;(Using Infopath 2003/Jscript): Up till today I always use selectSingleNode(&amp;quot;...&amp;quot;).text to get the value of a control. With a checkbox, that will return &amp;quot;true&amp;quot; or &amp;quot;false&amp;quot;, depending on if it is checked or not. However, I never liked string-comparing to &amp;quot;true&amp;quot; or &amp;quot;false&amp;quot;, specifically because one can configure the outcome of the checkbox to be &amp;quot;TRUE/FALSE&amp;quot; or &amp;quot;1/0&amp;quot;. That compair will fail and will have to be adjusted accordingly.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;It seems better to compare to the boolean constants &amp;#39;true&amp;#39; and &amp;#39;false&amp;#39;. Is that possible, without a cast? I tried to use selectSingleNode(&amp;quot;...&amp;quot;).nodeTypedValue but that also seems to return a string. &lt;/p&gt;&lt;p&gt;Tnx! &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>