Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

ReplaceChar() vs Replace()

7 - Meteor

So here is my rant/debate between the functions ReplaceChar() vs Replace() in Alteryx. Here is the setup data:

 

Carr","Bret","D","Carr","Spouse","

 

 

I want to replace:

 

","

 

 

With a single underscore:

 

_

 

 

See image below. What I received with ReplaceChar() was three underscores! I'm sure there is a use case for this but I'd love to hear anyone's use case if you have one!

 

Here is the difference for using the two. I don't see the point of the ReplaceChar () if Replace() can do nearly the exact same thing.

ReplaceChar_vs_Replace.png

 

Rant over. 😂

Alteryx Certified Partner
Alteryx Certified Partner

Rant accepted (sorry @Rant , this isn't about you!)

 

 replacechar will replace any characters listed it the specified replacement. If you have "," being replaced, it treats each char independently. 

replace looks for the string in its entirety. It replaces "," nicely with a single underscore. 

Cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Labels