LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only

Counted Loops and Nested Loops

  • 1.  Counted Loops and Nested Loops

    Employee
    Posted 01-12-2015 14:19

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ejones

    The attached graph demonstrates that nested loops do work. In this demonstration a library node wraps the "Do While" looping node to create a "Counted Loop" node. The largest example shows nested loos going 4 levels deep in the hopes that the pattern can be seen.

    The "Counted Loop" looping node is in the local library. You pass it the name of the field to hold the counter and the number of iterations to execute. For the nested loops, things got confusing when I tried to accumulate the data in the looping node so I did the accumulation separately in an "Output BRD" node. Doing this requires additional nodes to delete the BRD file when you are finished with it and to verify that the file is not there when starting the loop. Because of the larger number of nodes these examples are in their own composites.

    I am wondering if a counted loop node is actually needed in a real world graph. So if someone sees a need for this please post the context. The looping that I have seen the need for are 1) to repeat nodes when some stingy server only sends you some of the data and you have to keep requesting until you get it all. And 2) the need to execute a set of nodes for each input record, that post is here: http://community.lavastorm.com/threa...=7435#post7435
    Attachments:
    NestedCountedLoops.brg