V0.49.3 - I can't create custom columns using replace function - SOLVED

Hello.

Am I doing it wrong? I could create in previous versions, but now when I press Add the custom filter, it just disappear.

custom column code:

replace([Mes], "2", "Fevereiro")

Test 01

Test 2

That column is right formatted which implies it's numeric. You can only use replace on text columns.

1 Like

Ok, i tried using a text column and it worked, thanks!

But.. is there another way to replace numbers column?

You'd need to cast to a string first. I think you'll need to do that in the database.
Any reason you can't use an enumeration instead? Would save a load of work.
Alternatively, have a table of the month names with a month number for the join.

1 Like

Hey, thanks for your reply, but i solved it different.

I used a custom column with CASE, like:

case([dia_semana] = 1, "Domingo", [dia_semana] = 2, "Segunda-Feira",[dia_semana] = 3, "Terça-Feira", [dia_semana] = 4, "Quarta-Feira", [dia_semana] = 5, "Quinta-Feira", [dia_semana] = 6, "Sexta-Feira", [dia_semana] = 7, "Sábado")