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?
Solved! Go to Solution.
@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.
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:
ID | Wait | i |
dfsfssd | 55 | 0 |
sdfsgsd | 63 | 0 |
sdfsdfs | 60 | 0 |
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.
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.
@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.
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....
@timothycoxon Yes I agree that you had it setup correctly. I'm still not exactly sure why it was having a problem.