nested if in tmap

One Star

nested if in tmap

hi prof's........
i am facing small issue with tmap,pls help any one.....
Q:
row5.CUSTYP.equals("CO")?row4.RW1:
row5.CUSTYP.equals("BK")?row4.RW2:
():
-1
I need to write some expression inside () empty bracts.

NOTE: i am getting from source 3 rows(RW1,RW2,RW4),i wrote in above expression RW1 nad RW2,but i need to implement RW4 in the above expression.see condition for RW4
Condition:
now i am Variables: var1,var2,var3,var4
if var1=var2
if var3=var4
0%
else
20%
else
RW4
how we can implement the above conditions?
Thanking u in advance...........
Seven Stars

Re: nested if in tmap

row5.CUSTYP.equals("CO")?row4.RW1:
row5.CUSTYP.equals("BK")?row4.RW2:
var1.equals(var2)?var3.equals(var4)?0:20:row4.RW4
:-1