I’m having a bit of a brain melting problem. I’m working on the RPA Advanced - Generate Yearly Report project, and it’s mostly completed.
My Workflow to Merge all downloaded CSV Files into a single XLSX file has a for each CSV loop which should find all downloaded CSV’s with certain file names, add them to a temporary data table and then merge them into a master data table - which is written to an excel file.
This works 100% of the time if I run the workflow on its own.
When I run it as part of the main REFramework - in Debugging, I notice that the process completely ignores the for loop that performs this function and jumps over it, writing a blank data table to an XLSX file.
The section is below, if anybody could explain why it does this and what the correct process is, it would be a great help!
The file paths are correct and downloads populated.
The problem as I see it is when I run the entire project - everything runs perfectly until this point. The files download etc. I’ve added log messages before, in and after the for loop body.
It is entirely ‘jumped over’ with no errors, the log messages inside the loop don’t hit output… when I toggle a breakpoint on it it pauses on it and then skips it entirely on resume.
As I mentioned before if I run this specific workflow on its own it works every time, exactly as expected.
Just adding more of a visual representation of what’s happening:
Screenshot of the log output of a full run:
For loop is skipped for no reason that I can see, I can see I’m getting the in argument correctly as I log it after it’s assigned.
From the screenshot you provided it looks like taxid is the variable you are using in the filter of for each file in folder…
In the case where you are running it individually taxid is blank so it is getting all the files names which satrt with report
But the if you see when you run full tax id is being populated and your for loop filter which contains taxid is failing…either you have written a wrong filter…or the specific tax id do not have a file or there is dome extra space in the tax id which is failing the filter
Further individually as well give a taxid to variable and run it and check if that works…if not then correct the filter…if it works then use trim on tax id may be there are spaces
But with this it is sure that the issue is filter which is filtering all filenames