Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone I'M struggling with the syntax.
I have a field which ist called "achievement", data type BigDecimal.
Inside are values like : 0.756
Now I just want to create a condition in tmap like: if achievement>= 0.7 then 100 else 0
I tried this but something isn't correct:
(row1.achievement.compareTo(BigDecimal.valueOf(>=0.7)))? new BigDecimal(100) : new BigDecimal(0)
Thanks for any hints.
@pawe84 ,check the below expression.
(row4.newColumn.compareTo(BigDecimal.valueOf(0.7))==1 && row4.newColumn.compareTo(BigDecimal.valueOf(1)) < 0 ) ?new BigDecimal(100 ) : ((row4.newColumn.compareTo(BigDecimal.valueOf(1))==1 && row4.newColumn.compareTo(BigDecimal.valueOf(1.2))<0)?new BigDecimal(200):new BigDecimal(0))
Thanks but when I try this statement I'll get always this error
@pawe84 ,check the below condition.
row1.newColumn.compareTo(BigDecimal.valueOf(0.7))>=1?new BigDecimal(100) : new BigDecimal(0)
Thanks it's working.
How would the syntax be if there's the following condition
if achievement>=0.7 and <1 then 100
elseif achievement>=1 and <1.2 then 200
else
0
end
@pawe84 ,check the below expression.
(row4.newColumn.compareTo(BigDecimal.valueOf(0.7))==1 && row4.newColumn.compareTo(BigDecimal.valueOf(1)) < 0 ) ?new BigDecimal(100 ) : ((row4.newColumn.compareTo(BigDecimal.valueOf(1))==1 && row4.newColumn.compareTo(BigDecimal.valueOf(1.2))<0)?new BigDecimal(200):new BigDecimal(0))