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

Error running external bat program returned error code: 1

Ying
6 - Meteoroid

Hi,

 

I'd like to know if there's been any developments since this post: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/quot-The-external-program-quot-cmd-quo...

 

I'm also using a run command tool embedded inside the field summary tool and this error code: 1 is still appearing even though the Alteryx workflow completed successfully.  Here's the error message:

The Designer x64 reported: Error running Event #1: The external program "H:\Alteryx\Test Files\Moving_files.bat" returned an error code: 1: The operation completed successfully. (0)

 

I've also tried removing special characters and spaces in my directory paths but the same error appears.  Please note that the workflow does complete successfully, but the error still appears and is misleading.

 

@JessicaS (Customer Support Engineer) advised in April 2018 that Alteryx's development team is set to address this in a future release, is this still the case?

 

Thanks,

ying3

 

7 REPLIES 7
JoeS
Alteryx
Alteryx

Hi @Ying

 

Could you post your macro and I'll take a look please?

Ying
6 - Meteoroid

Hi @JoeS

 

Here's the workflow and input files.

 

Thanks!

@ying3

 

 

JoeS
Alteryx
Alteryx

Hi @Ying

 

I believe the issue is due to the fact that you were moving * with each command.

 

So the first line ran, this successfully moved all the files.

 

The second and subsequent lines then run, but they return an error code of 1 as there are no longer any .xlsx files in that folder.

 

If you switch the summarize tool to just take the first that should be fine. It looks like you may have put the unique in to try and sort this, but due to you having the embedded new lines all in one cell of data it is the unique list.

 

Also on the output tool, if you uncheck the "First Row Contains Field Names" you won't end up with the header in the batch file too.

 

Sorry, I would have made the changes to your workflow, but due to be not having an H drive mapped I couldn't.

Ying
6 - Meteoroid

Hi @JoeS

 

I'm sorry, I am not technical at all so I don't really understand batch macros, I basically followed the steps in your community posts with some trial and error to create my workflow.  So I'm having a hard time understanding your information and have written questions in line with your response. 

 

I'm afraid you'll need to provide step-by-step instructions (and explanations) on what I need to do to fix my problem - I hope that's ok?  Thanks for your patience.

 

Your response (blue) and my questions (orange):

 

I believe the issue is due to the fact that you were moving * with each command.

 

So the first line ran, this successfully moved all the files.

 

The second and subsequent lines then run, [YD: I didn’t know there were subsequent lines, where in the workflow creates these subsequent lines?] but they return an error code of 1 as there are no longer any .xlsx files in that folder.

 

If you switch the summarize tool to just take the first that should be fine [YD: How do I do this?]. It looks like you may have put the unique in to try and sort this [YD: How do I do this?], but due to you having the embedded new lines all in one cell of data it is the unique list. [YD: I don't understand what this means, are you able to explain in layman's terms?]

 

Also on the output tool, if you uncheck the "First Row Contains Field Names" you won't end up with the header in the batch file too.[YD: Why is having a header a problem and, out of curiosity, what text would be in the header?]

 

Sorry, I would have made the changes to your workflow, but due to be not having an H drive mapped I couldn't. [YD: Are you able to modify my workflow but change the H drive path for your purposes?  I think I can modify the Full Path and Directory on my side once I have your proposed solution so that it's correctly mapped to my H drive.  The zipped file I provided has the input files that you can test with.]

 

Thanks for your patience Joe, I really appreciate the help.

JoeS
Alteryx
Alteryx

Hi @Ying

 

No problem at all, I have had a go at modifying the attached workflow, so it should hopefully work, but I have done it some what blind due to not having an H drive.

 

I just wanted to mention, the workflow is creating a batch file as opposed to using a batch macro within Alteryx. Just in case it comes up in searching later on.

 

The reason you had multiple lines is that you were using the summarize to concatenate the rows in Alteryx, you had \n in there as your separator, which adds a new line character.

 

The unique tool was actually me, in updating your workflow, so you can ignore my comments there.

 

Let me know if the workflow works?

Ying
6 - Meteoroid

Hi @JoeS

 

Your configuration change to the Summarize tool worked - thank you so much!

 

To better understand this, and to help with future workflow creations, can you please explain what the Summarize tool is doing with this configuration?

 

Thanks!

 

Summarize Configuration.png

JoeS
Alteryx
Alteryx
I am glad to hear it.

In this configuration it takes the first row of data that is fed into it. Before it was concatenating (AKA joining) all the information together into one cell. But then separated by a new line character.

That was what led to having multiple rows in your output.

Now it’s only the one row :-)
Labels