Skip iterations element

Skip iterations element

In the designer you can insert the design element, Skip iterations directly within a Repeat element. This should be inserted as the last element within the repeat loop.
This can be used for skipping some of the iterations. In order to insert a skip iterations element you need to click this design icon:


This icon is found by first clicking the Repeat element a child element and then clicking the '+' icon as shown below:

The Skip iterations element has a single parameter, which is to be set to the iterations, that are to be skipped:


In the screen shot above the variable is setup to be the value of a variable. If the repeat is to execute as normally you should set this variable to 0 (zero).

Example: Skip a section of spooled file lines

Here is an example of where the skip iterations element can be used:

In this case we have a spooled file with a section of 4 lines, which starts with the text 'Congratulations' like below:

If the text 'Congratulations' is found, then we want to output the current line and the following 3 lines in bold within a box. We do not know anything about the text of these 4 lines so in principle the text 'Congratulations' could even appear again.

In order to prevent unnecessary conditions we want to skip these 3 lines from a line repeat loop and handle all of the 4 lines in a condition. 

The solution use the skip iterations element and looks like below:


The repeat loop handles 50 spooled file lines starting in line 6.
In the repeat loop we set the value of the variable, Skip to 0. That will cause the repeat to behave normally and iterate through all of the spooled file lines.

If the Congratulations text is found, then we add a container with a border, insert the 4 lines of text from the spooled file inside and set the Skip variable to 3.
This cause the Skip Iterations to skip the extra 3 lines we just handled.

If Congratulations is not found we simply output the current spooled file line (we set a fixed height of this text so that empty lines are also output).

    • Related Articles

    • Variable element

      It is possible to define one or more variables in the InterformNG2 designer. The advantage is, that you can use variables e.g. to add up all the detail lines of a page and output the page total in the footer. You can also use variables in normal ...
    • Design elements

      The elements, that you can use to build up a design (or template as they are called in InterformNG2) are described below. The elements are found on the top of the designer and are marked below with the pink frames: The bottom row is displayed if you ...
    • Comment element

      You can use the comment element to document the structure and changes to templates. To insert a comment in your template you need to insert the comment element with this icon: You find this icon by clicking the '+' icon to reveal the second row of ...
    • Select element

      In the designer there are two conditional elements: The If element and this, the select element. The select element is an advanced version of the If element, that makes it possible to branch out to different sub-folders with elements, depending on ...
    • If element

      It is possible to specify, that some design elements should only be included if a certain condition is met. For that you could use the If element as described below. A more advanced option is to use the select element. You can insert an If element ...