Alteryx Designer Desktop Discussions

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

Extracting a string from a complex paragraph.

call_me_nasa
5 - Atom

Greetings everybody,


Here is my unresolved issue: I am currently working with an Excel that has a field whose content is a combination of system generated information and xml code.

Here is an example (again, please keep in mind that the information below belongs to a single record):

The following errors occurred :

Next error:
PROCESSING ERROR == <?xml version="1.0" encoding="UTF-8" ?>

<AEX_WSResponseMsg>

<returnCode>101</returnCode>
<errorMsg>Quote number 0000000000 already used with this customer.</errorMsg>
</ResponseMsg>
</AEX_WSResponseMsg>

 

From the example above, I am only interested in extracting the information between <errorMsg> and </errorMsg>.

That is all I need.

Can this be achieved in Alteryx?

 

Thanks for your support guys!

2 REPLIES 2
JohnJPS
15 - Aurora

Hi @call_me_nasa

Definitely possible: just run a Summary to concatenate all the lines together, then do a Substring from the index (FindString) of the starting tag to the index of the ending tag. (Starting  index should be incremented by the length of the starting tag name).

Hope that helps!

John

 

call_me_nasa
5 - Atom

John,

 

You are a SAVIOR! It worked! Thanks a lot for your help sir :)

Labels