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!
Looks like eithere there are no files in downlods folder or the filter you are using in filtering all the values …
Is the filename assign used above used in the filter?
If so that might be wrong because there is a comolete folder pth present in it
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.
Screenshot of logs from a manual run of the workflow:
Spreadsheet populates perfectly every time:
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
@Anil_G I manually assign Tax ID a value of the last batch of files I downloaded when I’m doing manual runs.
However, I added a trim to the filter as you suggested and it has ended this nightmare
Thanks a lot for taking the time to reply!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.