Alteryx Designer Desktop Discussions

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

Have trouble with extracting string from column :(

dhxodud96
7 - Meteor

My purpose was using a Formula tool to write an expression that will extract the contract status from the provided string into its own column.

Extracting String.png

First i used >>  GetLeft([Info], ";")

Extracting String2.png

 

Then i used >> Trim([Info],"ContractStatus")

Extracting String3.png

Result is not i expected...

 

Is there any other ways to solve this problem? 

+ maybe findstring can help but i don't know how to use findstring. If somebody know where i can learn this please link url for me. 

 

Always thanks for helping me!

2 REPLIES 2
Christina_H
14 - Magnetar

The Trim function removes all characters in the substring from the ends of the original string, which is why you're getting those results.  It doesn't just remove the whole phrase.  You might want a Replace instead, Replace([Info],"ContractStatus","")

 

Alternatively you can do the whole thing in one formula with Substring:

Substring([Info],14,FindString([Info],";")-14)

dhxodud96
7 - Meteor

Thank you so much for your help.

Have a nice day!

Labels