community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Returning first letter in a string

Atom

Hi,

 

I am trying to select the first letter of the following sentence:

 

Queen Mary University of London

 

I want the formula to return QMUoL. Does anyone know of a way of doing this?

 

Thanks!

Pulsar
Pulsar

Hey @fahmed18 

 

Attached is how I would tackle this problem. First I would add a RecordID then split each record so that each word is on its own row. Then, use the Formula tool to get the first letter from each of those rows. Finally, use the Summarize tool to concatenate that newly created field.

 

Capture.PNG

Alteryx Certified Partner
Alteryx Certified Partner

Hi @fahmed18 

 

Would this work?

 

Formula Tool:

REGEX_Replace([Field1], "(?<=\w)(\w+\W?)", "")

 

Cheers,

 

Labels