# tLoop Standard properties

These properties are used to configure tLoop running in the Standard Job framework.

The Standard tLoop component belongs to the Orchestration family.

The component in this framework is available in all Talend products.

## Basic settings

| For | Select this option to have the task or Job being executed for the defined<br>number of iteration.<br><br><ul> <li> <span>From</span>: enter the first instance number which the loop                        should start from. A start instance number of 2 with a step of 2 means the                        loop takes on every even number instance. </li> <li> <span>To</span>: enter the last instance number which the loop                        should finish with. </li> <li> <span>Step</span>: enter the step the loop should be incremented                        of. A step of 2 means every second instance. </li> <li> <span>Values are increasing</span>: select this check box to only                        allow an increasing sequence. You need also to type a positive integer in                        the <span>Step</span> field. </li> </ul><br><br>Be sure to set the loop step and the Values are<br>increasing option in one of the following ways to avoid infinite<br>loops or other unexpected results.<br><br><ul> <li>To allow an increasing sequence, type a positive integer in the                              <span>Step</span> field and select the <span>Values are                              increasing</span> option.</li> <li>To allow a decreasing sequence, type a negative integer in the                              <span>Step</span> field and make sure the <span>Values                              are increasing</span> option is not selected. </li> </ul> |
| --- | --- |
| While | Select this option to have the task or Job being executed until the<br>condition is met.<br><br><ul> <li> <span>Declaration</span>: enter an expression initiating the                        loop. </li> <li> <span>Condition</span>: enter the condition that should be met                        for the loop to end. </li> <li> <span>Iteration</span>: enter the expression showing the                        operation to be performed at each loop.</li> </ul> |

## Global Variables

| Global Variables | ERROR\_MESSAGE: the error message generated by the component when an<br>error occurs. This is an After variable and it returns a string. This variable functions<br>only if the Die on error check box<br>is cleared, if the component has this check<br>box.<br><br><br>CURRENT\_VALUE: the current value. Only<br>available for a For type loop. This<br>is a Flow variable and it returns an integer.<br><br><br>CURRENT\_ITERATION: the sequence number of<br>the current iteration. This is a Flow variable and it returns an integer.<br><br>A Flow variable functions during the execution of a component<br>while an After variable functions after the execution of the component.<br><br>To fill up a field or expression with a<br>variable, press Ctrl + Space to<br>access the variable list and choose the variable to use from it.<br><br>For further information about variables, see *Talend Studio*<br>*User Guide*. |
| --- | --- |

## Usage

| **Usage rule** | tLoop is to be used as a start<br>component and can only be used with an iterate connection to the<br>next component. |
| --- | --- |
| Connections | Outgoing links (from this component to another):<br><br><br>Row: Iterate.<br><br><br>Trigger: On Subjob Ok; On Subjob<br>Error; Run if; On Component Ok; On Component Error.<br><br>Incoming links (from one component to this one):<br><br><br>Row: Iterate;<br><br><br>Trigger: On Subjob Ok; On Subjob<br>Error; Run if; On Component Ok; On Component Error; Synchronize;<br>Parallelize.<br><br>For further information regarding connections, see<br>*Talend Studio User<br>Guide*. |