hi guys,
I want to implement if else logic in expression builder in tmap.If i get an input string as "TRUE" i want to make it 1 in my output csv file or else if i get "FALSE" then i want to make it as 0 or else i want to make it as null.How to acheive this via tmap.Please Reply.Thanks in advance.
Regards,
Neeraj
Hi neeraj,
You cannot use if then else explicitly in tMap, however you can use a java ternary expression. e.g. row1.field.equals("TRUE") ? 1 : 0
If you have to use if then else then use a tJavaRow or write a custom routine.
Regards,
Rick
Hi, I have tried with the same logic(row1.field.equals("TRUE") ? 1 : 0) but it is returning me only "0". please could any one help me on this? Thanks in advance. Regards, Vetha.