Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Frank
98
Views
3
Comments
Breaking a Foreach Loop?
Question
Hello everyone,
I found a post on "Breaking a Foreach Loop?". The answer to the programmer's post is below, but I am going to need to see an example of this. I do not know how to create two end nodes - one inside the foreach cycle and one after the foreach cycle. Please elaborate. Show an example on how to create two end nodes- one inside the foreach cycle and one after the foreach cycle. I need to know how to break a Foreach loop using the "IF" widget. This is a common need of me as a programmer.
Thanks, Frank
"you need to use two end nodes. One inside the foreach cycle, and one after the foreach cycle.
Cheers,
Lúcio"
António Chinita
Hi Frank.
Here's how:
https://screencast.com/t/n9QxwAZz
Hope it helps :)
2 replies
Last reply 19 Jan 2012
Show thread
Hide thread
Frank
Hey Antonio,
Thanks for your help on this. It was very perplexing. That is crazy! You need a second "End" widget to break the loop, so the "For Each" widget does not get confused. I had my arrows converging on to one "End" widget......wow. I don't know what to say. A lot of my Outsystems programming has my process flows converging to one "End" widget, so I do not crowd my pages with a bunch of "End" widgets. But the "For Each" loop needs special treatment.:):):) This issue was a hair-puller. Again, thanks for the help.
Frank
António Chinita
It's a good practise to add End elements as needed.
They do not consume Software units, and help avoid some eventually long connectors, thus increasing code readability. :)
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...