Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Executing batch macro with multiple sets of parameters

MichalK
8 - Asteroid

I created a batch macro that loads data from a database with a number of parameters: 1. Date (read with control parameter tool), 2. filter criteria (another control parameter that updates field to use for join), 3. list of values to use in join (as macro input).

Now what I want to do, is to set up a workflow that will execute that macro for a list of dates (giving me data snapshots from multiple months). I tried passing a list of dates as the date parameter, but that does not work - the first date on the list is selected multiple times. Does anyone have any tips how I could build such a workflow?

 Macro flow.png

3 REPLIES 3
BenMoss
ACE Emeritus
ACE Emeritus

Hi!

 

I'm struggling to understand the issue here.

 

Would it be possible to share screen shots about your configuration and what you are trying to achieve.

 

Ben

MichalK
8 - Asteroid

Hi Ben,

 

I added a screenshot of macro workflow.

 

The macro works fine if I pass a single set of values that are read by control parameters, what I'd like to achieve is to run it multiple times for different dates and append the results.

MichalK
8 - Asteroid

 

t turns out that there was an error with the macro I built - the 'Replace a specific string' option was not working for some reason, and the macro always executed with the date set up in the macro input tool.

I replaced that with updating a cell in a Text Input tool, wrote a formula to create a SQL query (adding the cell value to a string) and passed that to Dynamic Input In DB tool:

 

Macro flow_2.png

 

After that change, if I pass multiple date parameters to a macro it executes for each of these - test setup to illustrate:

 

macro setup.png

 

The takeaway is to avoid using 'Replace a specific string' option if possible ;)

Labels