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.
While I am asking questions. Does anyone know what the last two options are (highlighted in yellow) and how to use them?
Thanks,
Seth
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?
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
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.
@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
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.
I am using message tool and giving configuration in such a way - Before Rows where Expression is true and message type is- Error and stop Passing records through this tool.
But I have a pdf output before the error tool that I want to get generated even if error is present.
But in this case if my file contains error then only error message comes not the pdf output that's generated before.
Can someone help me to generate the pdf output in both the cases but I do not want data to flow if error is present.