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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tMap Expression Builder - IF-ELSE statements

Hi folks,
Just wondering if it is possible to create if-else statements in the tMap expression builder. If you could give some examples it would be much appreciated.
Thank you in advance!
Labels (2)
14 Replies
Anonymous
Not applicable
Author

hello

i want to do this condition with tmap

Répéter VU_ALIM_TABLEAU_INTEGRATION.DATE + 1 Jusqu’à Date d’expédition - 1


@alevy wrote:
Certainly is. Use standard Java syntax: <boolean test condition>?<then expression>:else expression. For example:
row1.myKey.equals("FirstValue")?1:0


please can anyone help me please and thanks

Anonymous
Not applicable
Author

Hello folks,

 

How to use this if-else statement in Talend Expression Builder. Please help me on this

If

                Trim(( IF IsNotNull((ffr_dcconso_ref_initial.TITLE)) THEN (ffr_dcconso_ref_initial.TITLE) ELSE (""))) <> ""

then 

                if

                Trim(( IF IsNotNull((ffr_dcconso_ref_initial.TITLE)) THEN (ffr_dcconso_ref_initial.TITLE) ELSE (""))) = "1"

                then "MR"

                else               

else ""

 

--FLAG

Anonymous
Not applicable
Author

Hello,

You can use ternary if-else operator in tMap expression.

Condition?value if true: value if false

Best regards

Sabrina

Anonymous
Not applicable
Author

how can i get if condition,

if source = 'actif'  then '1'

else if '0'

Anonymous
Not applicable
Author

(source == actif)?1:0