My use case is this:
I need to read multiple files of the same format. I achieve this using a macro. So far so good. Sometimes, a few of those files do not follow the expected template format. My macro still produces results (as expected) for the correctly formatted files, and throws the usual "Error at Record #X: File not in expected template" etc for any files that are incorrectly formatted.
My question is, is it possible to pass the info of those files to a 2nd macro output so that I can use that info in my workflow and have for example a list of "Incorrectly formatted files" for manual investigation?
Yes we can I will be sharing the detailed solution by eod.
Thanks @dinakar_inakota , looking forward to it!
@dinakar_inakota Have you figured out how to do this?
For my use case I tried a simpler approach for now: Since I know all the filepaths that are being fed into the macro, and I know which files the macro read successfully, I can use a join tool afterwards in my workflow to identify the missed files.
However it would be nice if there was a way to somehow get the exact error msges from the macro into the workflow as data.
Hello @akism were you able to pass the macro error message? I have a similar use case, not finding solutions/suggestions
@angelnjj Unfortunately no. But because for my use case all I really needed was to check which files my macro wasn't reading, the solution was easy and didn't need the entire error message. I had the list of files being fed into the macro, and the macro also returned the files that were read successfully (but not the few that returned errors). So a join of population A minus population B let me identify which were the files with errors.