Alteryx Designer Desktop Discussions

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

Do while loop with an macro

mathias_schnoor
11 - Bolide

Hi!

 

I have build a Standard Macro with a Dowload Tool inside.

 

The Dowload Tool get a lot of urls

 

So I would like:

Either I get valid responses or not. When one response is not valid I want to increase the value of a parameter of the url and put the modify url and make the request again.


pseudo code:
http://myurl.com?myparameter=10;
myvalue= 10;
while (respose is not valid)
    myvalue := myvalue + 10;
    myurl := http://myurl.com?myparameter=myvalue;


Now I am looking for a soluion with Alteryx.
How It is possible?

 

I experimented with an Iteration macro, but it does not work for me?

 

Mathias

2 REPLIES 2
JohnJPS
15 - Aurora

Hi @mathias_schnoor

 

I think you have everything there, except for the actual URL call...

 

I added a pseudo URL call in there (which just generates a random number), and then a pseudo-formula to determine if the call was successfull (which should be True 10% of the time based on the random number)... and then feeds that to your outputs.  From here, you should just need to replace what's in the Tool Container with your actual URL call and success determination.

 Capture.PNG

Hope that helps!

 - John

mathias_schnoor
11 - Bolide

Hi @JohnJPS

 

It helps thank a lot!

 

Mathias

Labels