Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

RegEx question

Miki2021
8 - Asteroid

Hi all,

 

I want to replace the original sales order number to SAP number: 

 

Order number on sales platform: 555555 

Order number on SAP: 8000555555

 

Is there a better way to use RegEx to do the trick rather than using Excel to change the raw data?

 

thanks in advance!

 

4 REPLIES 4
Nanoq
8 - Asteroid

if you "just" need to add 8000 in front of the platform number, you can do the folowing in a formula tool:
"8000"+tostring([PlatformNumber])
-no need for regex

Miki2021
8 - Asteroid

@Nanoq thanks for the tip - do I need to change the original numeric format to string?

atcodedog05
22 - Nova
22 - Nova

Hi @Miki2021 

 

You can use the formula like below should take numeric type and give numeric type.

 

ToNumber("8000"+tostring([PlatformNumber]))

 

atcodedog05_0-1634300757203.png

 

Hope this helps : )

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@Miki2021 ,

 

Keep it simple:

 

8000555555  is equivalent to 8000000000 plus 555555

 

Try this formula:

 

8000000000 + [SAP Number]

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels