Hi,
I need a support. In the below picture, I have to find out decision column. If date is not empty and the value is greater than 5, then OK, otherwise Not OK.
My concept:
if(and(not(isMissing(column(“Date”))),column(“Value”)> 5){“OK”}
else{“Not OK”}
or
if(and(not(column(“Date”)=="")),column(“Value”)> 5){“OK”}
else{“Not OK”}
Both of my concept has same meaning?
And is there any other solution to check if the cell is not empty and value is greater than 5?
Hi @emshihab , in Knime, “missing” usually refers to null, an uninitialized cell, an empty value, while “” is actually an empty string, which is an initialized cell and therefore “” would not read as “missing”.
I’m not sure how the function isMissing() from the Column Expressions evaluates things, if it treats “” as missing, you would have to check the documentation or try it around and see.
Note: I added the strip() function to make sure that it also treats " " or " " or " " etc as “”. I also added the toInt() function to make sure that it’s evaluating the column Value as int. Knime could be already treating it as int, just like it could also not - it’s always tricky in this situation. With the toInt(), we’re making sure it’s int.