Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

replace whole field

Evita2510
5 - Atom

Hey I want to replace the column value completely based on condition. I tried replace and regex but they don't replace the entire field. For example:

 

If my column contains anything with 'gravendeel' I want to change the value to : The Hague.

But the column has multiple options, for example: 

' s gravendeel

s- gravendeel 

 

I tried: Regex_Replace([ShippingCity], 'gravendeel', 'The Hague') But then the output is : s-The Hague or 's The Hague. 

4 REPLIES 4
Emil_Kos
17 - Castor
17 - Castor

Hi @Evita2510,

 

you can use the find and replace field. Please explore examples build in Alteryx. I have a feeling yoi will find inspiration in there.

Evita2510
5 - Atom

I did, but the output is not as desired. My column has several variants, but as soon as it contains, in this example, 'gravendeel'  I want 'the hague' in its place. but it only replaces the 'gravendeel' part. See my examples from earlier

Emil_Kos
17 - Castor
17 - Castor

Hi,

 

Can you try this formula?

 

IIF(Contains([Field1], 'gravendeel'), 'The Hague', [Field1])

 

Please change the field 1 with the column name

Evita2510
5 - Atom

thankyou

Labels