I have problem with CloudConnect application. I'm trying to write a transformation code in REFORMAT component, but there is a problem with if
function.
Maybe the problem is with =
, but I have no idea how to fix it.
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;
}