Multiple Loops in One Job - VisualCron - Forum

Community forum

  •  grusu
  • No customer Topic Starter
Can I have multiple loops (not nested) inside one job?

The documentation seems to indicate yes, but when I attempt it, it doesn't work.
Praxis Consulting
Yes, you can. Just right-click on the task you want the second loop to start at and hit Add Loop. The setup is really identical to the first loop; make sure you point to a valid list in Loop settings. The part that's confusing, and what you're probably stumbling on, is that the loop variables with be the same: there will be only one set of loop variables in VisualCron variables->Jobs->Active Jobs. That caught me at first, since I expected each loop to have their own set. But, the loop variables are all relative to whatever loop you happen to be in, so things like {LOOP(CurrentValueXLine)} will always reference the current line of what you're looping through, of the loop that the task is in.
Scroll to Top