Shadi
1
Hi all,
is there a way to the content of a cell to blank based on a condition without affecting other cells in the column?
I have cells that have “?” and/or “nu” in them and where ever these 2 characters occurs I want them to be replaced with an empty cell.
Is there a way to do that?
Hi @Shadi
One way to solve this is via a contains()
function. For example:
if (contains(column("column1"),"?") == true || contains(column("column1"),"nu") == true) {
null
} else {
column("column1")
}
1 Like
Shadi
4
Thanks a lot. Now it works
1 Like
Hi @Shadi
Allright! Some additional alternatives: Cell Replace can also do it with .*nu.*|.*[?].*
String Manipulation can also work with toNull(regexReplace($column1$,".*nu.*|.*[?].*",""))
Edited
Shadi
6
Thanks. I am new to Knime and still exploring the program. It turns out that I had to manually install the “Column expression” :).
Thanks for the alternative way. I am sure I might need them some time
1 Like
system
Closed
7
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.