Loop Block

Use the Loop Block, along with the Loop Exit Block, to add a simple loop in your Map. The Loop Block is similar to an infinite Do-While loop. A Loop Exit is always required within a Loop Block.

Loop, along with Loop Exit, is generally used with an If/Else statement to loop until a condition is met and then continue processing the next Block outside the loop.

Note: In TIBCO Scribe® Online, the Loop Block is set to stop after ten thousand (10,000) iterations. If you need to change this limit, contact TIBCO Scribe® Technical Support.

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:

  1. If salesorderid equals salesorderdetailsid, meaning if the Detail record is a child of this Sales Order.
  2. Then, insert a new salesorderdetail record into the target.
  3. Else, end the loop and continue to the next salesorder record.

Tip: Unless your Map is designed to get a new record, TIBCO Scribe® Online processes the same record on each iteration.

Note: To improve the readability of a Map, select the collapse () or expand () icons on the Block to display or hide all of the Blocks included within the selected Block.

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 Map Errors And Warnings.

Once you have corrected the errors, select the Validate button to update the Errors and Warnings tab.

Related Topics

Control Blocks

If/Else Block

Loop Exit Block