How can I dynamically output generated PDF files into specific folders based on certain conditions?
I’m starting with an Excel input and using the Table and Layout tools to generate PDF statements. I want to organize the output so that:
Within each location’s folder, files are further grouped into subfolders by Manager.
Both Location and Manager are included in said Excel input.
What’s the best way to structure the output path in this case?
THANK YOU!!
Solved! Go to Solution.
Hey @TheAinJAC I published a blog for a similar use case on this sometime ago, but for Excel sheets. However, we can use the same approach for PDFs! The main part you're looking for is in the 'Additional information & tips' part - essentially grouping by the pertinent fields (Location and Manager in your case) and then creating a custom FileName or path in a Formula tool and then referencing that in the Layout tool. Hope this helps!
Hey @TheAinJAC here's an example I just created - feel free to open it up and take a look. We start off with the grouping:
Then we move to the Formula tool and create a FULL filepath, name and everything:
In the Render tool, you can set any 'Output File' value as this will be replaced anyway. Now, we tick 'Group Data Into Separate Reports' and choose the FilePath field, modifying the filename by 'Replacing Entire Path With Group':
You can see here our outputs are now split into the correct location/manager folders. Note: these subdirectories did NOT exist before I ran the workflow - they will be generated:
Hope this helps!
This was beyond helpful and worked perfectly! THANK YOU SO MUCH!!!