Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here

Dynamically Select Which Workflow to Run

Highlighted
8 - Asteroid

My current Alteryx project consists of 21 individual workflows (one for each input data format we receive). These workflows format each data set into a common format and then passes the output to another master workflow for final blending.

 

I am trying to build an app that allows the user to select the input file and the workflow that is setup to handle it. However, I am not sure how I can then run the selected workflow, passing the input file to its Input Data tool.

 

Any help would be greatly appreciated; thank you!

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

I would combine all 21 workflows into a single "input" macro. Then that macro can be used at the beginning of your "master workflow".

 

To create this input macro, put the contents of the 21 workflows into Tool Containers in the same workflow and use Action tools to only enable the container for the input file type. 

 

Let us know if you need help making this happen.

Highlighted
8 - Asteroid

Thank you; I'll give it a shot. I have never created macros before, though.

Highlighted
8 - Asteroid

I'm sorry; I can't figure this out. 

 

Here's the basic flow I need to accomplish:

 

  1. User starts the app (from the Gallery)
  2. The user uses a File Browser to select an original Excel workbook.
  3. The user then selects a value from a Drop Down that corresponds to which of the 21 workflows can handle this original report.
  4. After clicking Finish, the app needs to load the workflow corresponding to the selection made in step #3, and run it with the original workbook being passed as the Data Input.
  5. Once that workflow ends, the output needs to be passed to another workflow, with the output being the new Data Input.

Is this kind of process even possible with Alteryx? I am especially confused on how to pass the output from one workflow to another; can we even save Output data to a file if the app is run from the Gallery and not the Desktop?

Highlighted
9 - Comet

Here's a screenshot showing how it could be set up:

 

You'll need one set of 1) Radio Button 2) Action tool with update using Formula 3) Container 4) A macro of the workflow (one of 21) for each format

 

The final Output Tool shown here can be another workflow as well.

Multiple WF.PNG

 

Each of the macros (workflows) internally only require a Macro Input and Macro Output tool. Replace the Summarize tool here with your actual workflow contents.

 

macro setup.PNG

 

 

One thing to note is that with this setup, each of the (21) workflows are going to be bundled inside the main App OR stored at a UNC path somewhere. You can't insert a live link to other workflows saved on your Gallery.

Highlighted
8 - Asteroid

Is there a way to use a Drop Down instead of 21 different Radio Buttons? If I could someone use a formula to read the Drop Down selection and then disable all the other 20 workflows, that might work. Seems like too much clutter to use 21 radio buttons (especially as our needs grow and more input formats get added)...

Highlighted
9 - Comet

Yes, you can use a Drop Down instead. You'll still need multiple Action tools which each check the selected Drop-down value and update each container to be enabled accordingly.

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@nrossin wrote:

Is this kind of process even possible with Alteryx? I am especially confused on how to pass the output from one workflow to another; can we even save Output data to a file if the app is run from the Gallery and not the Desktop?


This is done using the temporary directory. When an Alteryx workflow start, it creates a temporary directory to work out of. You can reference this in your workflow using "%temp%". So if you want to write a file output for your app, but don't want to permanently save it, write something like "%temp%\FileName.yxdb". This file can then be passed from the app back to the user in the gallery using the "On Success - Show Results to User" in the Interface Designer (the default is to show all outputs). 

 

If you want to pass values from one workflow to a macro, configure the macro input and output tools and connect them like any other tool. If you want to pass values from one app/wizard to another, you can "chain" them using the "On Success - Run Another Analytic App" option in the Interface Designer and they will share the same temporary directory. This means you can run one app, save files in the temp directory, and reference them in the next app using the same "%temp%" reference.

Highlighted
8 - Asteroid

Thank you both for your help; I think I am getting closer.

 

I think the overall problem is that I need to use the Interface to determine which Input Data tool to flow to. I do not want to input the data from the file selected by the File Browse tool until after we've routed to the correct of the 21 workflows.

 

Here's a quick diagram of what I have so far:image.png

I cannot figure out how to do this, though. I need to use an Action Tool in order to enable/disable containers, but how do I add a condition to the Action Tool based on a value in a workflow tool?

 

Thank you so much for all your help and patience; I am still learning!

Highlighted
9 - Comet

I'm not sure if you saw my previous post, but you just need to change the Radio buttons into a Drop Down.  The Actions connected to the Drop Down will only enable the container that matches the drop down selection - everything else will not run. You can still have one single input (from File Browse) connected to all "workflows".

direct workflow.PNG

Labels