Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Run different workflows depending on the excel sheet name

Jmarquez
7 - Meteor

hello everyone, I am quite new to creating apps and would appreciate some help.

 

I am trying to create an app that will be shared within my and whose output will feed a dashboard every month.

 

the workflow will be fed from two excel files, both with different tabs and structures. But always with the same name for the tabs.

 

The idea is to create an interface where the app user selects the excel files and depending on the tab name it filters to run one workflow or another and the results are saved in the same excel output but in different tabs.

 

I have managed to do this when designing the workflows by adding each tab as a different input, but I am not able to make this selection  done automatically from the file that the user selects.

 

 

I attach an image of the workflow so far.

 

sample wf.png

 

thanks in advance.

 

4 REPLIES 4
MattBSlalom
11 - Bolide

I think I understand that the driving variable will be the Sheet name, not the File Name, right?

 

I would tackle this by splitting your current App workflow into 2 macros (one per Excel sheet).  Then, create a parent App workflow that handles your Excel selection Interface tool, reads the Sheet names of the selected file, then uses a Filter tool to pass the Excel path to the appropriate macro.

 

Sample parent App workflow:

 

MattBSlalom_0-1618263271391.png

 

 

 

Child Macros setup to use Dynamic Input that's fed the file path from the Macro Input (passed from the Parent App above) instead of your current Interface tools (obviously yours will consist of all your other logic instead of just a Browse tool):

 

MattBSlalom_1-1618263462548.png

 

 

Jmarquez
7 - Meteor

Thank you for your replay.   

 


I am not familiar with the macro and am a bit lost with it, could you explain the process to me? I don't quite understand it.

 

Also, I'm not sure if the dynamic imput will work, since the structure of the tabs is not the same.

 

Thanks!!

MattBSlalom
11 - Bolide

As a concept, a Macro is just a workflow that we encapsulate to be used as a tool in another workflow.  For example, drag a Count Records tool from the Transform palette onto a canvas and right-click on it, then select "Open Macro...".  That will show you the workflow that exists inside that single tool.

 

MattBSlalom_1-1618323730648.png

 

Similarly, we're turning your workflow into a single tool (actually 2 tools in this case).  We need to split your workflow and save each half as a separate workflow / macro.  Then we need to replace your existing file input tools with the sample from my fake macro.  The Macro Input tool will convert the workflow to a macro & the Dynamic Input tool will allow us to pass the Excel file path at runtime (you can update the Input Data Source Template configuration of the Dynamic Input in each of your split workflows to be the expected structure).

 

MattBSlalom_3-1618324437472.png

 

 

Once you have your 2 macros saved, you need to use them in place of my fake macro calls in the parent App workflow from my previous reply.  There are a couple of ways to get a macro into your canvas (Macro help documentation) :

 

Option 1 - Add a tool palette to hold your macros

 

In Designer, you can map to the location where you save macros and create a macro repository to easily save macros and use them in a workflow. Any macro .yxmc file in the selected location displays in the tool category on the Tool Palette.

To create a macro repository...

1. Go to Options > User Settings > Edit User Settings > Macros.

2. Select the "+" button.

3. In Category Name, enter a name. The default name is Macros.

4. Select the "..." button to browse to the location where you save macros on your computer or a network.

 

Option 2 - Right-click, insert macro

 

To use a macro that is not on the Tool Palette, right-click the workflow canvas and select Insert > Macro. Any macro that is currently open on the canvas can be selected from this list or you can browse to the location of a different macro *.yxmc file.

Jmarquez
7 - Meteor

Thank you so much! It was really helpfull.

 

 

Labels