In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

String Manipulation

Krish
8 - Asteroid

Hi,

 

I need a help in converting string in following way.

 

1_Rec_Type to be converted to 1:Rec_type

2_Rec_Len to be converted to 2:Rec_Len

i.e first occurrence of _ to be replaced with :

 

thanks,

Krish

2 REPLIES 2
patrick_digan
17 - Castor
17 - Castor

 

@Krish Have a look at the function ReplaceFirst. Here is the help doc on it:

 

ReplaceFirst(Str, Target, Replacement)

Returns the string (Str) after replacing the first occurrence of the string (Target) with the string (Replacement).

Example

ReplaceFirst("abcdefb", "b", "_") returns "a_cdefb"
daniellefzimmerman
6 - Meteoroid

thank you! I did not know this formula existed. you saved me hours of headache. 

Labels
Top Solution Authors