How to check in tmap NULL and NOTNULL value in IF Conditional.

One Star

How to check in tmap NULL and NOTNULL value in IF Conditional.

Hi
I have been reading through some posts, but not sure I am understanding.
I have an input tables with values. I need to do the following Conditional in tmap.
All the columns are string value.
IF ISNULL(ROW1.JURISDICTION1) THEN
INPUT.XMLTAG1
ELSEIF ISNOTNULL(ROW1.JURISDICTION1) and ISNULL(ROW2.JURISDICTION2) THEN
INPUT.XMLTAG2
ELSEIF ISNOTNULL(ROW1.JURISDICTION1) and ISNOTNULL(ROW2.JURISDICTION2) THEN
INPUT.XMLTAG3
END IF;
Could you please help me this..
Thanks
Rajesh G
One Star

Re: How to check in tmap NULL and NOTNULL value in IF Conditional.

Hi Rajesh
Try this.
ROW1.JURISDICTION1==null? INPUT.XMLTAG1Smiley Sad(ROW1.JURISDICTION1!=null)&&(ROW2.JURISDICTION2==null)?INPUT.XMLTAG2Smiley Sad(ROW1.JURISDICTION1!=null)&&(ROW2.JURISDICTION2!=null)?INPUT.XMLTAG3:""))
Regards,
Pedro
One Star

Re: How to check in tmap NULL and NOTNULL value in IF Conditional.

Hi,
This solution works??
Thanks!
One Star

Re: How to check in tmap NULL and NOTNULL value in IF Conditional.

Hi,
This solution works?
I have the same problem.... but this not resolve....
Thanks,
Cláudia
Hi Rajesh
Try this.
ROW1.JURISDICTION1==null? INPUT.XMLTAG1Smiley Sad(ROW1.JURISDICTION1!=null)&&(ROW2.JURISDICTION2==null)?INPUT.XMLTAG2Smiley Sad(ROW1.JURISDICTION1!=null)&&(ROW2.JURISDICTION2!=null)?INPUT.XMLTAG3:""))
Regards,
Pedro
One Star

Re: How to check in tmap NULL and NOTNULL value in IF Conditional.

Use Talend relational functions