Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Iterative macro count issue.

timothycoxon
7 - Meteor

Screenshot 2018-10-12 at 12.38.11.png

 

Hi, Getting a little stuck with this iterative macro. I am feeding it a set of data with [wait] and [i]... The macro then increments the [i] on the first record and pauses for one sec then rejoins that first record to the remaining records to iterate.

Each run it checks [i] = [wait] and if they are equal then it outputs that record.

The macro works exactly as expected. It feeds out each row after [wait] seconds, right up till the last record. On the last record it continues to iterate the last record every second to what I would assume to be infinity.. 

The d Output is me trying to debug this.. that final record with [wait]=[i] does not go down the iterate branch... it just loops between the Input and Output.

 

Anyone have any thoughts?

 

7 REPLIES 7
patrick_digan
17 - Castor
17 - Castor

@timothycoxon I'd be glad to help. Can you provide some sample data? I'm having a hard time visualizing the process (my fault, not yours), but I'm a little confused why you're iterating i for a single record (ie you're formula tool adds 1 after your sample tool grabbing one record) and unioning that with the other other records where i was not modified? I may be way off base, but should the formula tool iterating the i be placed after the union? Some sample data may clear up my confusion.

timothycoxon
7 - Meteor

The data is basically just an id field, a wait field and an I field.

Before the data hits the macro I am getting a "total run time" and then dividing the total number of records between that and then adding in a little variance. 

 

So could be something along the lines of:

 

IDWaiti
dfsfssd550
sdfsgsd630
sdfsdfs600

 

If for example I had three records and set a 3 mins total runtime.

 

I am just trying to rescue someone in the office from having to sit at their desk for hours at a time posting information in a "human" manner.

timothycoxon
7 - Meteor

Oh and this would probably be easier to checkout than a screenshot ;)

timothycoxon
7 - Meteor

Oh and in answer to your question about placement of the iterating formula. 

The idea is that it only iterates the first record. So it counts up to the wait time on the first record, outputs that, then starts on the second record... 

So if the formula came after the union it would iterate all records not just the first. 

patrick_digan
17 - Castor
17 - Castor

@timothycoxon I see what you're doing now. I think you have it setup correctly. I think it's a bug/metadata issue. I would switch the order of your tools around to put the filter at the end. That seemed to work for me.

Capture.PNG

 

timothycoxon
7 - Meteor

Awesome, Seems to work for me too... did a quick test run with some limited data and it worked perfectly.. 

Just running it with a lot more data in the App but it does seem to be working :)

 

Weird that it wouldn't work the other way... not really technically any difference....

patrick_digan
17 - Castor
17 - Castor

@timothycoxon Yes I agree that you had it setup correctly. I'm still not exactly sure why it was having a problem.

Labels