title: Formula won't display when certain fields are null
body: <p>Similar to my first question. I want to show my address in a text box containing the fields as follows</p>
  
  <pre><code>{Company}
  {AddLine1}
  {AddLine2}
  {ZIP}{State}{City} 
  {Country}
  </code></pre>
  
  <p>The line that concerns me (and hopefully some of you guys) is {ZIP} {City} {State}. What I want to produce is a consistent addressing format, so that there will be no blank space or indentation even if a ZIP, City or State field has been left blank in the DB. This line should still line up with the rest of the rows and not be indented. I also wish to insert commas between zip, state, city where they are relevant and leave them out where not. For this I have  written a formula. Below:</p>
  
  <pre><code>If isnull({BILL_TO.ZIP}) or trim({BILL_TO.ZIP})= "" Then "" else {BILL_TO.ZIP}
  +
  (If isnull({BILL_TO.State}) or trim({BILL_TO.State})= "" Then ""
      else(If not isnull({BILL_TO.ZIP}) and length(trim({BILL_TO.ZIP})) &lt;&gt; 0 Then ", "        else "") + {BILL_TO.State})
  +
  (If isnull({BILL_TO.CITY}) or length(trim({BILL_TO.CITY})) = 0 Then ""
      else(
  
              If (not isnull({BILL_TO.State}) and length(trim({BILL_TO.State})) &lt;&gt; 0) 
                  or
                  (not isnull({BILL_TO.Zip}) and length(trim({BILL_TO.Zip})) &lt;&gt; 0)
  
              Then ", " else "")+ {BILL_TO.CITY}))
  </code></pre>
  
  <p>The problem is that when there is only a city (no state or zip entered) the formula itself will not display. It does however display when the others are present. </p>
  
  <p>Can anyone see a bug in this code??? Its killing me</p>
  
  <p>Thanks for the help.</p>
  
  <p>Look forward to hearing from you guys!</p>