Skip to main content
Windward

Enhanced ForEach Tag

Overview

The attribute and features discussed in this article only function when the entire forEach (start and end forEach tags) are in the same table.

 

This sample demonstrates each feature described below.

End ForEach (deleteRow attribute)

When this attribute is set to true, the row containing this tag will not be output in the generated report.

  • false - default - row output normally
  • true - all content in this row is not output to the final report

Examples

Example 1 (deleteRow='false')

<foreach><out>​
</foreach deleteRow='false'>​

 Example 1 Output

Output from out tag 1​
 
Output from out tag 2​
 

 

 

 

Example 2 (deleteRow='true')

<foreach><out>​
</foreach deleteRow='true'>​

Example 2 Output

Output from out tag 1​
Output from out tag 2​

ForEach (order attribute)

The new 'order' attribute allows you to choose between legacy, row-major, or column-major expansion.

  • legacy - default - forEach functions exactly like the forEach tag in previous versions for backwards compatibility. Will not apply 'deleteRow' on its ending forEach.
  • row - expands each new row of data in a new row
  • column - expands each new row of data in a new column

Examples

Example 1 (order='row')

<foreach order='row'><out>​
</foreach deleteRow='true'>​

Example 1 Output

Output from out tag 1​
Output from out tag 2

 

 

 

Example 2 (order='column')

<foreach order='column'><out>​
</foreach deleteRow='true'>

 

Example 2 Output

Output from out tag 1​ Output from out tag 2

ForEach ('block' attribute)

The new 'block' attribute allows you to expand a forEach in a table without affecting surrounding cells. It will attempt to add blank cells as needed to maintain the shape of the table.

This also allows you to expand forEach tags side by side in the same table.

Note: block currently only functions to order='row'.

  • false - default - block feature is not used
  • true - expands forEach as a block

Examples

Example 1

  Above forEach​  
Left of forEach​ <foreach block='true'><out>​ Right of forEach​
  </foreach deleteRow='true'>​  
  Below forEach​  

 

 Example 1 Output

  Above forEach​  
Left of forEach​ Output from out tag 1 Right of forEach
  Output from out tag 2  
  Below forEach  
  • Was this article helpful?