tHMap and if then else (or ternary operator)

Highlighted
Six Stars

tHMap and if then else (or ternary operator)

Hi experts,

 

I'm working on a job that reads from a table (now I'm using a test text file) and writes an IDoc.
I have to implement an if-then-else on some fields, and I'm wondering how I must use it.
I dragged the function IfThenElse from the palette into the interested field, but how I must use it?
How can I set that the condition is fieldfrominput = 'value', then fill with an incremental number from 0000000001...?

 

This is how it is the function once dragged on the field.
IfThenElse
(x)Condition - Drop/paste here
(x)Then - Drop/paste here
(x)Else - Drop/paste here

 

Another question I want to ask you: is it possible to use ternary operator in the tHMap?
If yes, how I can set it?

 

Thanks in advance.

Best regards,

Corinne

Highlighted
Moderator

Re: tHMap and if then else (or ternary operator)

Hello,

We have redirected your issue to our TDM experts and then come back to you as soon as we can.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog