If you have ever watched a For Each or While loop grind on forever while your CPU cries, you will appreciate Break and Continue. These simple activities let you stop a loop early or skip a single iteration. That saves time, clutter, and your reputation when automation does not behave like a confused intern.
Choose For Each when you have a collection to iterate over. Choose While when you need to keep running until a condition changes. They both work with Break and Continue in the exact same way. The difference is what determines when the loop repeats.
Put a Break inside the loop when you want an immediate exit. For example if you are searching for the first matching record and you find it, Break stops the loop and sends control to whatever comes after the loop. This avoids processing extra items for no reason.
Use Continue to skip the rest of the current iteration while letting the loop carry on. It is the tidy way to say skip this one and handle the next without nesting half your workflow inside if blocks.
Run your workflow in Debug. Step through a few iterations and watch Log Message or Write Line outputs. Seeing a log right before a Continue is especially satisfying. If the loop behaves oddly test these scenarios
Search for first match in a collection
Filter out bad items while keeping the loop going
Named activities help. Use descriptive names on Break and Continue so anyone reading the flow knows why the loop ends or skips an item. Pair each Break or Continue with a Log Message or Write Line so the runtime trace tells the story without detective work.
Break and Continue are tiny tools but they punch above their weight in RPA. Used properly they reduce unnecessary processing increase readability and make debugging less like forensic archaeology. Test edge cases add logs and wrap risky operations in Try Catch. Then go enjoy the rare feeling of an automation that behaves.
I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!
This is a dedicated watch page for a single video.