I'm struggling to word this meaningfully so if anything more needs to be said from me, please let me know.
I've created two Flows. One Flow puts all of the attachments from my emails into a folder. The same flow iterates over these items to determine which month folder to put them in determined by the text present in the name. The number of items put into any month folder is counted and turned into a variable. That count variable is passed to the second Flow.
The second Flow determines if there are any files in any of the month folders using an if statement tree, "If CountVar >= 1 Then"... This part is working flawlessly. When I have 11 items for October, 11 files are put into my October folder and 11 items are passed to this second Flow.
The issue is that the second Flow will always iterate only one folder's items. As though it can only "see" the one count variable.
My current Flow If / Else If statements are designed as such:
(FileCount - FileCount gets me to a solid starting point to count up again. I know I have a number items from my previous Flow, but I want to make certain that this second Flow is actually counting/iterating all of the items. Later in my For-Each loop I add +1 to the count variable to return back to the original count... assuming everything went without hitch.)
The first If statement is to check December. I figured this part was rather arbitrary, as to which end of the year I begin my evaluation from.
The Else Ifs flow from December to January and each evaluate the same thing. If the var passed from the first flow is 1 or greater, then check the contents of that folder and later grab those files for further processing.
As I was saying earlier, this process works flawlessly... once. I could have 60 items for October and 5 for November, and since November iterates first, only 5 November are processed. The purpose of passing this file count var is to prevent unnecessary checks and processing. If I know for a fact I only have files to do with October, there's no point in checking January through September, or November and December.
I've been working on this project in small pieces for about 2 weeks now. I'm starting to go cross-eyed trying to battle my way through new issues that keep cropping up due to oversight or poor design.
I need this Flow to accept whatever number variable it was passed and do an action for each corresponding folder instead of exclusively performing actions on whichever folder comes first numerically.