Column expressions adds a "(#1)" to each column name

I have two expressions in a Column Expression node. I have a simple string manipulation expression to strip each column of whitespace, and a rule expression which removes empty strings. I’m very new to Knime but i think these work ok except the rule expression adds “(#1)” to every column name. The names go into the column expressions node as (e.g.) “Product_code_1” and come out as “Product_code_1 (#1)”.

Clearly I’m doing something wrong but i don’t know what.

Below is a screenshot of the nodes in sequence, the regex nodes change the column names all to ANONYMOUS_COLUMN and then changes it back with a flow variable. I tried to make the workflow without renaming the columns and adding the flow variable of the currentColumnName to the output flow variable in the column expression node, but this worked out even worse as each column was duplicated 3 time. I saw someone using the renaming technique in an example in order to make the Output Column on the expression dynamic (instead of using flow variable).

The rule expression is:

if (column(“ANONYMOUS_COLUMN”) != “”) {

Hi there @ThomasJ,

welcome to KNIME Community!

How about using String Manipulation (Multi Column) node if you are performing same manipulation over multiple columns?

Have couple of ideas what could be wrong in your current design but it would be best if you share workflow to avoid unnecessary guessing if you are interested to find that out :wink: See here how to do that: