Alteryx Designer Desktop Discussions

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

Iterative Macro: If RowCount = 100, Loop, otherwise, return?

PSmitty334
6 - Meteoroid

Hey All,

 

Is there a way to do an extremely simple "If row count = 100 Then, Else", and pass the workflow data through both ways? Adding a count to all rows, filtering them, then removing the column is the only way I can see to do this but from a programmatic standpoint seems extremely unnecessary.

 

More Info:

I have an interactive macro inside a batch macro. I'm using an API call to pull records from many databases (batch), but hit my API cap in some databases (iterative). Thankfully (sarcasm), my API's don't give me a "next", "count" or any way to know how if there is more data. The only thing I can do is download the max records for each call (100), iterate, and stop when I don't download 100.

 

I've discovered that a simple conditional row count and passing data is not a simple task. I can count/summarize, but I ALSO need to pass the URL/Auth data to the next iteration.

 

Not sure what to do...thanks!

 

Is there a way to do an extremely simple "If count = 100 Then, Else", and pass the data through both ways? Adding a count to all rows, filtering them, then removing the column is the only way I can see to do this but from a programmatic standpoint seems extremely unnecessary.

2 REPLIES 2
DanM
Alteryx Community Team
Alteryx Community Team

@PSmitty334 

 

I'm not quite following the  pass the workflow data through both ways

 

Are you trying to make sure that with your calls that you understand how much data is left to pull from the API's since it seems there's a limit per call? What's the ultimate goal?

 

I also think seeing the macro might help the Community see your setup and better understand how to assist.

 

 

PSmitty334
6 - Meteoroid

Hey Dan - Thanks for the response, I couldn't find this post after I created it (wasn't showing up in my profile history either for some reason). Apparently the issue with the workflow was the System.IteratorCount looping infinitely in the beginning iterations for some reason, as if it wasn't incrementing. Rather than referencing this variable, I just incremented a value I kept passing through the macro. 

 

I accidentally posted this before I could upload my workflow, sorry about that, nonetheless, this issue is resolved.

Labels