Hello everyone
I've figured out what my final XML Parsing should look like, which has taken a while, but I am happy with the results.
I need to extract multiple XML invoices. They'd actually be contained in a zip file so ideally i'd be able to extract and process but worst case we could just manually extract.
What I'd like to do is have all xml go into this one file that would be generated each day for the batch of invoices that are received through our e-invoicing portal
I've seen another similar request where JoeS helped create a batch macro to do this (without the zip element) so hoping that some kind individual (maybe JoeS) can help point me in the right direction!
Thanks a lot
Cass
Solved! Go to Solution.
Hi @ck2024
I have created a batch macro of your original workflow.
I think one of the sample XMLs that you sent through were missing a few elements though, so I haven't been able to test it my side.
Please find the batch macro attached. It will need the receive a list of full paths.
Hi Joe
Thanks for jumping on board
I uploaded the wrong version as I subsequently discovered the Ensure Fields to deal with those instances of child fields not being present in the XML.
I have updated it in the attached, but the problem I find is that it is just repeating contents of the first file rather than importing both files.
If I run the workflow for the two invoices in the package individually I'd expect 4 lines.
But the batch report produces this
Could you help me get this right? I just tried adding a 3rd xml and it just creates additional lines of the first xml.
Thanks for your help. This will the AP team a good chunk of time so really keen to get it working!
Hi @ck2024
It looks like the action tools weren't quite configured.
If you look on the left hand side above nothing has been selected to be updated. I changed this in the below:
This now updated the input path to the new XML file location.
It also was the same for your action to update the formula tool, so I updated that too:
You can see at the top I needed to update the expression, but also down the bottom I needed to just replace the ReplaceMe, not the strings otherwise the expression will have a syntax error as the file path will not be text qualified.
Lastly I then tested it to find out the schema's are slightly different for each file. So I needed to update this setting in the interface view:
Which then lead to me getting the output you require (I hope!)
Please find the macro attached.
PS, I used to work for Experian for 10 years 🙂
Hi Joe
You are a legend.
Thanks for that clarification - clearly missed a few key steps! What am I missing with the macro config as on the interface designed for me it doesn't have anything! Could you share the workflow instead of the macro - that'd probably solve it but it'd be good to know for next time anyway!
I've heard about a few people that have left Experian to pursue Alteryx careers elsewhere - it is a strong draw!
Thanks again.
Hi @ck2024
No problem. You'll need to be in the macro itself for that tab to work, rather than on it within a workflow.
If that makes sense? AKA open the macro in Designer.
Cheers
Joe
Makes a lot of sense - I think I was just confused with one of the pics!
I am not sure what I am doing wrong, but I get this error when I try and run the macro...can you upload the version of the workflow that contains the macro inserted within it and i'll see ifi can get it to work?
Thanks
Cass
Awesome, thanks a lot Joe.
I need to create some room on my hard drive though as it consumes a huge amount of temporary space so I'm not quite there yet, but I will get there shortly! Thanks for your help, really appreciate it.
Yeah, it can start to create a few temp files when powering through it all!
You're welcome glad we got there and it's going to save you some time going forwards.