<?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: How to use an "if" in an expression box?</title><link>https://www.infopathdev.com:443/forums/thread/64224.aspx</link><pubDate>Wed, 16 Feb 2011 02:31:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64224</guid><dc:creator>arangas</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64224.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=64224</wfw:commentRss><description>Great post on the InfoPath team blog! Wish I&amp;#39;d been able to find that!

You&amp;#39;re right, I may be able to use conditional formatting. However this was the simpler of my two examples that I need to use &amp;#39;if&amp;#39; for.

Thanks for your help, much appreciated!</description></item><item><title>Re: How to use an "if" in an expression box?</title><link>https://www.infopathdev.com:443/forums/thread/64223.aspx</link><pubDate>Wed, 16 Feb 2011 01:52:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64223</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64223.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=64223</wfw:commentRss><description>&lt;p&gt;There is. The formula is a little challenging -- &lt;a href="http://blogs.msdn.com/b/infopath/archive/2006/11/27/conditional-default-values.aspx" target="_blank"&gt;here&amp;#39;s&lt;/a&gt; a explanation of it. &lt;/p&gt;
&lt;p&gt;But, you know -- do you need to store the &amp;quot;formatted&amp;quot; pay rate? Why not just put two expressions boxes (calculated values in IP 2010) on your form with some conditional formatting. One has the text &amp;quot;N/H&amp;quot; in it, and is conditionally formatted to hide if PayRateUnformatted != 0. The other is PayRateUnformatted&amp;nbsp;formatted as a percent (so you don&amp;#39;t have to concat) or your original concat formula. Hide if PayRateUnformatted = 0.&lt;/p&gt;
&lt;p&gt;I suppose, if you are promoting the PayRate to your SharePoint library, you&amp;#39;d need that formatted field though. I think the link in my first paragraph&amp;#39;s Method 2 would work for you... something like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;concat( &lt;br /&gt;substring(&amp;quot;N/H&amp;quot;, 1, (../my:Working/my:PayRateUnformatted = 0) * 3), &lt;br /&gt;substring(concat(../my:Working/my:PayRateUnformatted, &amp;quot;%&amp;quot;) , 1, (not(../my:Working/my:PayRateUnformatted = 0)) * string-length(concat(../my:Working/my:PayRateUnformatted, &amp;quot;%&amp;quot;)))) &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>How to use an "if" in an expression box?</title><link>https://www.infopathdev.com:443/forums/thread/64222.aspx</link><pubDate>Wed, 16 Feb 2011 00:14:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64222</guid><dc:creator>arangas</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64222.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=64222</wfw:commentRss><description>&lt;p&gt;I have a field called PayRateUnformatted containing an integer value. Then there&amp;#39;s the field PayRate which contains the following default expression:&lt;/p&gt;&lt;code&gt;concat(../my:Working/my:PayRateUnformatted, &amp;quot;%&amp;quot;)&lt;/code&gt; 
&lt;p&gt;This isn&amp;#39;t quite right.&amp;nbsp;The field PayRate should contain the value &amp;quot;N/H&amp;quot; if PayRateUnformatted == 0.&lt;/p&gt;
&lt;p&gt;Is there any way to do this?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>