if with multi condition

hi @alrz , I’m assuming these are string columns. You may also be able to use String Manipulation (Multi Column) :

select only the columns that you want to act on, and use the following expression to replace “x” with “y”:

string(
	1 == length($$CURRENTCOLUMN$$)
	?replace($$CURRENTCOLUMN$$,"x","y")
	:$$CURRENTCOLUMN$$)

see the “conditional expressions” paragraph here for further info:


Mind you, given the cell length to check for is 1, I think that replacing “x” with “y” could be done as a simple literal replacement, using regexReplace:

regexReplace($$CURRENTCOLUMN$$,"^x$","y")
3 Likes