ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Change specific character in field

aka_ash
アステロイド

Hi,

 

Looking for some guidance on the below scenario.

 

For the example below how can I replace the 4th character in the Input to "." if it is a "D"?

 

InputExpected Output
1234567812345678
123D5678123.5678
123.456789123.456789
333D444D333.444D
919191DD919191DD
282828R28282828R28
AA1010101101AA1010101101
874D1234874.1234
54.123454.1234

 

Thanks in advance,

Ash

3件の返信3
MarqueeCrew
20 - Arcturus
20 - Arcturus

@aka_ash ,

 

no regex!

 

IIF( Substring([Input],3,1) = "D", Left([Input],3) + "." + Substring([Input],4) , [Input] )

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
huynv96
コメット

Hi @aka_ash ,

It may help you:

Formular:

IF Substring([Input],3,1)="D"
THEN
Substring([Input],0,3) + "." + Substring([Input],4,Length([Input])) ELSE [Input]
ENDIF

image.png

aka_ash
アステロイド

Hi @MarqueeCrew & @huynv96 ,

 

Thanks for your advice, great to see that there are a couple of ways to achieve the result, both methods work for me.

 

Thanks again,

Ash

ラベル
トップのソリューション投稿者