how to write full code to complete result

color is yellow and size is small then class is inflated…
$Color$ = “yellow” AND $Size$ = “small” => “inflated”
how to get not “inflated value” for remaining cells. Its showing “?”

Hi @CAMahi, welcome to the KNIME community.

It’s probably best to mention the node that you are having difficulty with, although I can see that this is the Rule Engine.
You will want to have as your last line what happens under all other circumstances. You do this by supplying a "TRUE => " line.

The reason for this is simply that the Rule Engine chooses the first rule that equates to “TRUE”. Therefore, making the last rule as simple “TRUE” means it catches everything else. If the Rule Engine doesn’t find a matching rule, it returns “missing value” which is what you are finding.

e.g.

$Color$ = "yellow" AND $Size$ = "small" => "inflated"
TRUE => "not inflated"

alternatively, if you are replacing the value of a column such as “inflation-setting”, and you want to replace its value with “inflated” under the condition stated, but leave it alone for all other circumstances, you could do this:

$Color$ = "yellow" AND $Size$ = "small" => "inflated"
TRUE => $inflation-setting$
2 Likes

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