Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conditional If Statement Help

In tMap I'm writing this statement  row2.Credit_Debit.equals("CR")? row2.Adj_Adj_Amount: 0 

The data type to output is double.  Basically, if a column is this text than give the amount in another column 0683p000009M7sj.pngotherwise zero.  Getting compilation errors.

 

 

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hi,

   

     What is the data type for the input column row2.Adj_Adj_Amount If its double then fine. Else, the most easy way is to handle the condition according to your input data type and keep the output component same as input data type. You can add a tConvertType after tMap to convert to any other data type.

 

     Could you please double check whether the issue is at same line or something different by toggling to the code tab in your Studio Designer sheet? It will show the exact error and you can identify the corresponding problematic column.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved