Replacing cell values using Multi Column String Manipulation

Attached you see a simple table. There are nine “QValue” columns and one “Unique Count” column. I am trying to automatically transfer the appropriate “Unique Count” value to each “QValue Column” when the QValue column contains a “1.0”.

I’m attempting this using the String Manipulation (multi column) node, but I can’t get the regex formula to work. Please denote the precise regex capable of dong this–or tell me there’s a better method than the String Manipulation node.

Thank you for your help :slight_smile:


Hi @creedsmith,

the expression replace($$CURRENTCOLUMN$$,"1.0",string($Unique Count$)) should work., but you have to exclude the integer Column.

Best Regards
Andrew

1 Like

Hi Andrew, I am still getting an error (attached graphic). I also tried the exact column name “Unique count*(ListingId)” and get the same error. Any chance it’s due to the “*” KNIME placed in the initial output column name?

Thanks, creed

Hi @creedsmith,

I’m sorry, I have used the column name Unique Count in my workflow. You have to use your own column name Unique count *(ListingID). Select the Unique Count string with both $ signs, delete it and double click on your Unique count *(ListingID) column name. Cursor inside the round brackets from string().

Best regards
Andrew

1 Like

Andrew, I had already tried both versions before my last message. Nothing works.

Hi @creedsmith,

you need $-signs around your column name and you have to embedded your column name inside the string() function. If I have no typo this should work …

replace($$CURRENTCOLUMN$$,"1.0",string($Unique count*(ListingId)$))

Best regards
Andrew

1 Like

Got it, thank you Andrew

1 Like