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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Tmap condition expression problem

hi everyone, i'm a begginer in talend looking for a solution to my problem;
So, here my screen shots:
in fact, i have two tables in two different databases, and i have only one output.
i'm recovering a column (YX_TYPE) from table 2(row6) in the output,
here is the output result:
0683p000009M2jf.pngimg1
until here, everything is ok
when i put a condition in my tmap expression : (row6.YX_TYPE="LA2"?row6.YX_TYPE:"2" )
if YX_TYPE="LA2" (show row6.YX_TYPE) (LA2)
else show "2"
i don't know if i made a syntax mistake
here is the resut of my output
0683p000009M2jk.pngimg2

here is a screenshot of my tmap and my job

img3

0683p000009M2jp.pngimg30683p000009M2ju.pngimg4

Labels (2)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@9allel22 ,you have to use below way.

 

row6.YX_TYPE.equlas("LA2")?row6.YX_TYPE:"2"

or 

("LA2").equlas(row6.YX_TYPE)?row6.YX_TYPE:"2"

View solution in original post

4 Replies
manodwhb
Champion II
Champion II

@9allel22 ,you have to use below way.

 

row6.YX_TYPE.equlas("LA2")?row6.YX_TYPE:"2"

or 

("LA2").equlas(row6.YX_TYPE)?row6.YX_TYPE:"2"

Anonymous
Not applicable
Author

Good Luck my friend ! 0683p000009MANf.png 

manodwhb
Champion II
Champion II

@9allel22 ,check the below way .

 

row6.YX_TYPE.contains("LA2")?row6.YX_TYPE:"2"

or 

("LA2").contains(row6.YX_TYPE)?row6.YX_TYPE:"2"

Anonymous
Not applicable
Author

here is the result of your first solution,

the second one gave me the output what i want, thank's for helping bro0683p000009M2fV.png