Issue with toEmpty in String Manipulation node

Hi KNIME Community,

I’ve encountered an issue with the

String Manipulation

node and wanted to share it here to see if anyone else has experienced something similar or has suggestions for a workaround.

In the example workflow at the end of this thread you can see I’m trying to create a new column called “activity” in my table by concatenating several columns (

activity_type

,

activity_relation

,

activity_value

, and

activity_units

) using the

join

function. Here’s the expression I used:

join(toEmpty($activity_type$), " ", toEmpty($activity_relation$), " ", toEmpty(string($activity_value$)), " ", toEmpty($activity_units$))

The problem arises when the

activity_units

column is missing. In such cases, the entire result of the

join

operation turns out to be null, which isn’t what I expected. I assumed that

toEmpty

would convert any missing values into empty strings and that the

join

would still work with the remaining non-null values.

In fact, when I use the

toEmpty

function alone in a String Manipulation node on a table with missing values, it doesn’t seem to convert those missing values into empty strings as I expected (see the example workflow). Am I misunderstanding how the

toEmpty

function is supposed to work, or could there be another reason for this behaviour?

Has anyone faced a similar issue? Any insights into why

toEmpty

doesn’t seem to fully handle this situation?

Thanks in advance for your help!

Gio

toEmpty_function_problem.knwf

P.S.: I’m running KNIME AP 5.2.6.