if condition

Dear all,

I have a table with two fields:
field1
field2

I try to realize the following metacode:

if field2 = null (missing value) then
field2 = field1
else
field2 = field2
endif

I tried with node column expression without success:

if
column(“field2”) = null
{
column(“field1”)
}
else
{
column(“field2”)
}

replacing column field2

Where is my fault? Knime is not happy with the compare line…

Thx for help!

BR, Heinz

Hi @Heinz

Make that

if (column("field2") == null) {
column("field1")
} else {
column("field2")
}
2 Likes

Thank you very muhc for your help!

BR,

Heinz

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.