Customer Portal

usage of IF Statement

Comments 2

  • Avatar
    admin
    0
    Comment actions Permalink
    Hi Akhil,

    please take a look on http://doc.cloveretl.com/documentation/ ... -ctl2.html and http://doc.cloveretl.com/documentation/ ... -ctl2.html

    In your case:

    if (isnull($in.0.ID)) $in.0.ACCOUNT_NAME; else $in.0.BILLING_CITY;


    should work. I added round brackets around condition and add semicolons for each statement. Also, you are probably missing left side of statements. So it should be something like:

    if (isnull($in.0.ID)) $out.0.MY_FIELD = $in.0.ACCOUNT_NAME; else $out.0.MY_FIELD = $in.0.BILLING_CITY;


    Or shorter:

    $out.0.MY_FIELD = isnull($in.0.ID) ? $in.0.ACCOUNT_NAME : $in.0.BILLING_CITY;


    I hope this helps.
  • Avatar
    akhil
    0
    Comment actions Permalink
    Thanks Jaroslav.

    Thanks & Regards,
    Akhil

Please sign in to leave a comment.