Rule Engine with values from another column

Hi I am trying to build a formula to assign a certain value if the content of the column is equal to some values in an array else take the value from another column in the table.
I did the formula below:

$Column 1$ IN (“Value 1”, “Value 2”,“Value 3”) => “Mickey Mouse”
TRUE=>$Column 2$

but all I got is ? in every row for the newly create column.
What am I missing?

Hi @Marco_Timperi , welcome to the KNIME community forum.

What have you got the output column set to?

e.g. Is it set to replace Column1, or append a new column?

Perhaps you can upload some sample data and screenshot of your Rule Engine config.

1 Like

Hi, I am appending a new column and it is set to be a string.

So you are saying that the column “Requestor JJEDS LH03” contains non-missing values, but that the new column “Should be mapped to” ends up with missing values (i.e. ?)?

I cannot at the moment think of a scenario where that would happen. Can you upload a small sample work that demonstrates this happening (with anonymized data if necessary)

1 Like

I too feel this is not reproducible, provided that the column types are all non-problematic. Maybe the missing values in the outcome column were there because Marco didn’t put in the correct values when writing the script in the Rule Engine. In the example given, he typed in a space after the value Melissa and Mario.

1 Like

Maybe your results are not fitting neither the one or the other case.
Try this:
Delete line 2. Replace it with
"NOT $Requester JJEDS LH04$ IN (…same content as line 1…) => $Requester JJEDS LH03$
This should give you an output in every case. Check this output, continue from there on.

1 Like

The thing is that a TRUE => case will always match so unless Requestor JJEDS LH03 is missing it should not be possible for the result of those two rules to return missing.

So it would be good to see the input and output data or a Workflow that demonstrates the apparent behaviour, because as far at I can see, this can’t happen as described unless there is a sudden bug in Rule Engine which seems unlikely.

1 Like