Alteryx Designer Desktop Discussions

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

Macro help needed for changing inputs automatically

Suvasini
7 - Meteor

Hi,

I have a workflow which has two inputs - Train no and origin as shown in the screenshot. The workflow is ready and has to be run with the input of path 1 for train no and origin for the output of path 1. This has to be done for all 10 paths. Instead of changing input for each path and running the workflow 10 times, how can I use a macro to automate it as I have over 300 paths? Would save considerable time if it could be automated.  

Train for Path1Path2Path 3Path 4Path 5Path 6Path 7Path 8Path 9Path 10
 11274137121269814955146921395012002135231434213250
           
           
Origin station forPath1Path2Path 3Path 4Path 5Path 6Path 7Path 8Path 9Path 10
 CSMTNDLSNZMDLIAIMAUBDTSCZMDEEDEC

 

Thanks in advance,

Suvasini

6 REPLIES 6
RishiK
Alteryx
Alteryx

@Suvasini you can do this via a Batch Macro where the Path is your Control Parameter ie the group you want to repeat the workflow/logic for.

 

This article by @EricWe is a great one to get you started:

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Getting-Started-with-Batch-Macros/t...

messi007
15 - Aurora
15 - Aurora

@Suvasini,

 

Let's imagine that you need to filter each path and run the process as you said:

Below the batch macro that will allow you to filter:

 

messi007_0-1610007073584.png

 

Below the workflow that will call this macro with the inputs and one column that contains all the path:

 

messi007_1-1610007389910.png

Attached the workflow,

 

don't forget to update the question for the batch input:

 

 

messi007_2-1610007460958.png

 


If this solves your issue please mark the answer as correct, it will help others!

Regards,

 

Suvasini
7 - Meteor

Hi @messi007

 

Firstly thankyou for the detailed explanation. I need the workflow to run with the train and origin output of path 1 entirely, generate the output and then run it again for path 2  train and origin. From what I researched, I believe an iterative macro does this. Request you to kindly help me in that scenario. Appreciate the help, thanks again. 

messi007
15 - Aurora
15 - Aurora

@Suvasini,

 

So want to generate as file as paths:

 

Below added a formula in order to create a file for each path:

 

messi007_1-1610009417115.png

 

 

And then I used the as an output:

 

messi007_2-1610009449011.png

 

Below the result with 10 files

 

 

messi007_0-1610009368762.png

Attached the workflow,

 

Regards,

Suvasini
7 - Meteor

@messi007  Thank you for the explanation again. I am not able to open the workflow you sent as it is saying it is an alteryx package. Is it possible for you to send it as a yxmd file. Thanks alot again, hope to learn more from you. 

messi007
15 - Aurora
15 - Aurora

@Suvasini,

 

Attached the workflow and the macro.

 

yxmc: is the macro and yxmd is the workflow.

Please save them under the same folder and then open the .yxmd file.

 

Hope that helps,

Regards,

Labels