Alteryx Designer Desktop Discussions

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

Loop a process until condition is met

Analyst323
8 - Asteroid

Hello,

 

Been spending the last couple days trying to get this to work with an iterative macro but can't quite get it work with an API call. 

I figured I would try to post an example workflow. It's a bit difficult to describe without having the API call in place so I put sample results in an input tool at the end of each container.

 
Representing the process in containers, the first container would be the initial run and the second container would theoretically be the second run and would complete the process because the API call returned a status of "Complete". 

 

I would like this API call to repeat until I get a status of Complete. Any suggestions would be great. 

4 REPLIES 4
AndrewDMerrill
13 - Pulsar

It does sound like an iterative macro is exactly what you'd need. Did yours look something like this:

Screenshot.png

Analyst323
8 - Asteroid

Thanks, I think I made some significant progress. I brought in the macro and connected it to the main workflow. Any idea what this error could mean? The schema shouldn't be changing every iteration...it's just doing repeated API calls.

Capture.JPG

Edit** Fixed it with a summarize tool to lock in the headers. I think every iteration was duplicating the headers causing it to post that error. 
Edit2** Summarize tool actually stopped making it work all together. 


This is what i'm seeing on the Complete output and the iteration output. It looks like it's duplicate headers on the iterations
Capture1.JPGCapture3.JPG

But I don't think the iteration is repeating until status is complete. I'll try to test a few more. Attaching the macro.

Looks like someone else encountered this issue but I don't see a solution posted. When I do autoconfigure by name, the macro doesn't post any data which I'm guessing is due to the filter we have in place.
https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Macro-issues-with-quot-Field-s...

Analyst323
8 - Asteroid

I think I got it to work! I just put a summarize tool before the download tool so that the headers would remain the same on the iteration. 

 

Thank you for your help!

AndrewDMerrill
13 - Pulsar

Great job problem solving! I'm glad you were able to achieve a solution.

 

You are very welcome.

Labels