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.

Output "Message Tool" Error if File Fails to Process in Batch Macro

smoskowitz
12 - Quasar

Hello Everyone -

 

I hope you are all safe and healthy!

 

I have a batch macro that: 1) Takes a list of Excel (xlsx) files and gets all their sheet names. If, for some reason a .csv gets in there, I want to create a Message that a particular file didn't process.

 

My goal is to take all these errors and post them to a file on SharePoint - a log file - for lack of a better word, but I can't for the life of me figure out the proper configuration of the Message tool.

 

smoskowitz_0-1611939736715.png

 

 

While I am asking questions. Does anyone know what the last two options are (highlighted in yellow) and how to use them?

 

smoskowitz_1-1611939935860.png

 

Thanks,

Seth

5 REPLIES 5
PHinkel
7 - Meteor

Hi @smoskowitz,

 

I would advise using a Filter Tool on the File Name to divert any non-xlsx files away from the primary workflow.

Using a Formula Tool you could create the log-file message very similar to how you created it in the Message Tool and then using an Output Tool you could append the new "errors" to the log file that you have saved in SharePoint.

You can still use the Message Tool to alert the user that the specific .csv files were not processed.  Would you want to stop the process altogether or just inform the user?

smoskowitz
12 - Quasar

Hi @PHinkel --

 

I do not want to stop the process. I just want a mechanism to alert the user that something happened.

 

I do get the whole filtering out of csv, but I want any error message to be somehow captured. Any thoughts?

 

Thanks,

Seth

 

 

PHinkel
7 - Meteor

Hi @smoskowitz,

 

Take a look at the attached pictures.

The Message Tool set up to send an Error will alert the user during the run which files could not continue with the rest of the process.

The Output Tool then appends to a file (.xlsx or whatever your preference is) in a SharePoint path that you provide.

By setting the Output Tool to append to the file the Output Tool will not overwrite the previous data, but it will add new data each run, serving as the Log File that you desire.

You will want to create the excel file with the same headers that you plan to append in the future.

smoskowitz
12 - Quasar

@PHinkel --

 

This is extremely helpful -- but only for a situation where the file type is incorrect. My goal was to capture all errors during processing and while this does solve one of those instances, there is still a broad range of reasons that a workflow might not process a file. Do you have any thoughts on capturing all errors?

 

I am aware that the CReW Runner macro will do this, but I am not sure how I can run a workflow I plan on publishing on the server using that tool. Do you have experience with that scenario?

 

Again, much appreciated, and I appear to be on a quest.

 

Thanks,

Seth

PHinkel
7 - Meteor

@smoskowitz 

 

That makes a lot of sense.

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/CReW-Macro-Support/ta-p/465740

According to the link above you may have issues running the CReW Runner Macro on Server.

Theoretically, it looks like you would take your current workflow and turn it into a Macro or App.

You would then direct the Runner macro to the App that it is supposed to run.

And then you'd put the workflow with the Runner macro onto Alteryx Server.

Labels