If-else condition formula help

Six Stars

If-else condition formula help

Hi,

 

I have a below table.

Stage_Name        Closedate

 Close Won           11/30/2016

 Close Lost           03/05/2016

 Active                 10/06/2017

 

so I have to write a condition in my Tmap that if my stage_name= Close Won or Close Lost , then Closedate = 01/01/2018 else keep same value of closedates.

How do I put that condition in tmap..?

 

       


Accepted Solutions
Thirteen Stars

Re: If-else condition formula help

!row1.Stage_Name.equals("Active") ? "01/01/2018" : row1.Closedate
Manohar B

All Replies
Six Stars

Re: If-else condition formula help

Put an expression as 

! Stage_Name.equals("Active") ? "01/01/2018" : Closedate 

 

Thirteen Stars

Re: If-else condition formula help

!row1.Stage_Name.equals("Active") ? "01/01/2018" : row1.Closedate
Manohar B

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.