I am trying to write a if else logic
howerver the logic seems to fail. The and condition statements don’t seem to work for me. I am referring to all string fields. Do we have a simple if else way to do things since this is frustrating.
my logic is
if
(column(“a”) == “abc” && column(“b”) in (“def”,“ghi”)
{
“a”
}
else
{
column(“a”)
}
The logic doesn’t throw an error but it gives a ? in the result. I don’t know how i can troubleshoot it.
Thanks Scott for your response.
Unfortunately, i have 50 odd strings that are supposed to be equated with. The easiest i could think was using the IN operator.
The solution which you mentioned, while it works but its really cumbersome to write as the number of strings to be matched with increases in number.
I hope the newer versions of KNIME do tackle this and make it easier for the rest.