title: IF function - Reformat component
body: <p>I have problem with CloudConnect application. I'm trying to write a transformation code in REFORMAT component, but there is a problem with <code>if</code> function. 
  Maybe the problem is with <code>=</code>, but I have no idea how to fix it. </p>
  
  <pre><code>function integer transform() {
      $out.0.date = str2date($in.0.Date, "yyyy-MM-dd");
      $out.0.price = str2decimal($in.0.Amount);
      if ($in.0.Purpose = 'A') {return "Facebook";} else if ($in.0.Purpose = 'B') {return "Google Adwords";} else {return SKIP;};
      return ALL;
  }
  </code></pre>