Alteryx Designer Desktop Discussions

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

Build a batch macro that runs for each value in a field

jbqrn
7 - Meteor

Hi everyone!

 

I am trying to build a batch macro that is updated with a value from an excel file but I dont know how it is done... 

 

Just as "simple" as this... hehe

 

jbqrn_0-1665075480332.png

 

 

Inside the macro

jbqrn_2-1665075564630.png

 

I have previously done batch macros updating a file but never cells in a field... (in this example only two values but it is expected to be hundreds)

Then  it call an API, thats why I need a Batch macro (not related with the issue)

 

 

Thanks!

 

 

4 REPLIES 4
Qiu
21 - Polaris
21 - Polaris

@jbqrn 
Can you give us sample input and output for use to better understand the issue?

jbqrn
7 - Meteor

Hi @Qiu 

 

I want to introduce several rows in a batch macro to make one call to an API for each row.

Data INPUT: 

NIF

A123456789
B123456789
C987654321

 

With these values added to an excel, I want to make the call (I realized that it is not necessary the APPEND FIELDS tool if I do a macro)


I need that data contained in the column [NIF] to be updated each time the macro runs.

 

1st run: call API with A123456789

2nd run: call API with B123456789

3rd run: call API with C987654321

And so on...

 

Is it clear now? If there is any doubt ask me!

 

Thank you!

 

danilang
19 - Altair
19 - Altair

Hi @jbqrn 

 

This case doesn't require a macro at all

 

danilang_0-1665328080680.png

 

Just append the NIF to URL and pass to a Download tool.  The download tool will run once for each line in the input and union the results

 

Dan

 

 

 

jbqrn
7 - Meteor

Hi @danilang it is true that the API makes single calls but in my case I needed that the workflow works as a Batch macro because of the way it is designed.

 

I finally reached this solution:

jbqrn_1-1665390065162.png

 

update the value CIF inside the API to use the values in the excel that I load.

 

Thanks!

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels