Loop Block
Use the Loop block, along with the Loop Exit Block, to add a simple loop in your flow. The Loop block is similar to an infinite Do-While loop. A Loop Exit is always required within a Loop block.
Loop and Loop Exit are generally used with an If/Else statement to loop until a condition is met and then continue processing the next block outside the loop.
Loop Block Example
A Loop block can be useful when inserting child records. Assume you have Sales Order records with child Sales Order Detail records within the Loop:
- If salesorderid equals salesorderdetailsid, meaning if the Detail record is a child of this Sales Order.
- Then, insert a new salesorderdetail record into the target.
- Else, end the loop and continue to the next salesorder record.
Block Properties - General Tab
From the General tab, you can change the Block Label and add a description.
Block Properties - Errors and Warnings Tab
If there are any errors or warnings for this block, the Errors and Warnings tab displays the number of errors or warnings in the tab name. See Block And Flow Errors And Warnings.
Once you have corrected the errors, select the Validate button to update the Errors and Warnings tab.