title: javascript to check if a field has a value
body: <p>If it does not have a value do one thing, else do something else. See my code below. This is currently not working. I'm pretty sure my if statement is incorrect but unsure how to fix</p>
  
  <pre><code>if(new_steponecontractrecieved)
  {
      Xrm.Page.getAttribute("new_totalamountcollected").setValue(item2);
  } else
  {
      Xrm.Page.getAttribute("new_totalamountcollected").setValue(item1+item2);
  }   
  </code></pre>