Stack/Queue Iterator

   

[FinalBuilder Professional Edition]

 

The Stack/Queue Iterator action is used to run a set of actions for each of the items in the list.

 

StackQueueIterator

 

Stack/Queue name - select the name of the list which you want to iterate.  If there aren't any items in this list, you need to use the Stack/Queue Define action to create a new list.

 

Variable To Set - specify the variable to set to the current items for the iteration.

 

Below is an example of how to use the iterator.

 

StackQueueIteratorEx

 

After the queue is defined, and some items have been added to it, the iterator action will execute the "Do something" and "Do another thing here" actions for every item found in the list.  For the child actions to get access to the current item from the iterator, they need to use the variable used in the iterator action.

 

If the list includes the following values: "a" and "b".  Then, the "qitem" (see top screen pic) will be set to "a" and then the "Do..." actions will be executed.  And then for the next iteration, "qitem" will be set to "b" and then the "Do..." actions run again.

 

After the iterator action runs, the list will be empty.