Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Multi-field XML parse inside batch macro

arno_bürgin
7 - Meteor

I want to XML parse several fields in a workflow, see the OuterXML fields:

 

arno_bürgin_0-1580223101538.png

 

Since this is inside a batch macro the number of fields to parse varies. Is there a way to parse multiple fields (just like a multi-field formula tool) and also accounting for dynamically changing number of fields?

I can't share the data sorry. Thanks in advance.

5 REPLIES 5
afv2688
16 - Nebula
16 - Nebula

Hello @arno_bürgin,

 

If you know which fields you want to parse on each file you could create another parameter on the xml parse tool and with the action tool just change the concatenated values to parse.

 

Would be another column to input into the parameters.

 

Does it make sense to you?

 

Regards

ck2019
9 - Comet

I have this challenge in my data that I discuss here.

 

One way I got around this was by always using an Ensure Fields tool from the CRew macros to help with this, but you need to know the full schema in order to do this.  I only needed key fields but it might help you.

arno_bürgin
7 - Meteor

Hi @afv2688,

 

Thanks for your fast answer. I kind of know what you mean, this is the direction I was going for:

 

arno_bürgin_0-1580224649146.png

 

The select records tool contains a list of the fields:

 

arno_bürgin_1-1580224707447.png

 

Although I am not sure what you mean with "another parameter" and I don't know how to connect the action tool to the XML-parse tool on the bottom.

afv2688
16 - Nebula
16 - Nebula

Hello @arno_bürgin ,

 

Was looking for something like this:

 

Untitled.png

 

Regards

arno_bürgin
7 - Meteor

I see, thank you for the screenshot @afv2688. I initially couldn't use the action tool this way because the input parameters were created by the batch macro. I solved it by using two macro instead.

Thank you too @ck2019, I checked out your solution - it might be helpful in the future.

Labels