We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How Can I Dynamically Output PDFs by Condition

TheAinJAC
5 - Atom

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:

  • PDFs are grouped into folders by a common Location field.
  • 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!!

4 REPLIES 4
DataNath
17 - Castor
17 - Castor

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!

 

Blog: https://community.alteryx.com/t5/Engine-Works/How-to-Render-to-Multiple-Named-Excel-Sheets/ba-p/1015...

TheAinJAC
5 - Atom

Thank you! If I have 10 unique managers and 300 unique output files, do the 10 unique folders already have to be created and added to the Render tool? 

Essentially, how do the manager folders get created and the output files get slotted into them when I Run the workflow?

DataNath
17 - Castor
17 - Castor

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:

 

location_manager_group_1.png

 

Then we move to the Formula tool and create a FULL filepath, name and everything:

 

location_manager_group_2.png

 

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':

 

location_manager_group_3.png

 

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:

 

location_manager_group_4.png

 

Hope this helps!

TheAinJAC
5 - Atom

This was beyond helpful and worked perfectly! THANK YOU SO MUCH!!!

Labels
Top Solution Authors