Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

FindString for "<"

Heitor
5 - Atom

I have string values in my excel data input [E-mail] like below, and i am trying to parse the name "Kkkkk,·Ersal" from it by finding the "<" in the string. 

 

Kkkkk,·Ersal·<Ersal.Kkkkk@test_dup_563.com>

 

However the FindString function FindString("<",[E-mail]) only returns -1

 

Any suggestions?

 

Thanks!

3 REPLIES 3
dataMack
12 - Quasar

What you are trying to do can be accomplished with regular expression (RegEx).  Alteryx has both a RegEx tool as well as support for RegEx in the functions in the formula tool (look under the string category).

 

You'd want to do this:

^(.*?)·<

 

Which will match everything up to the ·< in your string, thus leaving you with the name you are trying to parse out.

RodL
Alteryx Alumni (Retired)

@dataMack probably gives you the best approach using RegEx, but if you want to use the String functions in Alteryx, the issue was with the order you had the fields in the expression.

It should be...

FindString([Email], "<")

 

With your expression of FindString("<", [Email]), the result was False as indicated by a -1.

 

And I assume you would want to nest that into a Left function, so the correct expression to get the name from the Email is...

Left([Email], FindString([Email], "<") - 1)

Heitor
5 - Atom

Thank you Jason and RodL! Now i also know a different way to do it. Really appreciate the help.

Labels