Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear experts,
I have an issue with this formula in my tMap :
row2.status == "PRE_TXT" ? 1 : row2.status == "TXT" ? 2 : -1
In fact, it's only return -1 whereas I have the values : "PRE_TXT" and "TXT" in my source field.
Many thanks. Best regards
I've found the solution :
row2.status.equals("PRE_TXT")?1:row2.status.equals("TXT")?2:-1
I've found the solution :
row2.status.equals("PRE_TXT")?1:row2.status.equals("TXT")?2:-1
Removed my post, as I'd made a mistake regarding Java operator precedence. Sorry.
Comparing the value of strings using .equals() is guaranteed to work in all cases, and that's specifically what it's designed to do.
Thank you for these explanations
Best regads