Combining Loops and Tables

Both table and loop nodes have a Data tab, which enables you to read internal tables. However, to describe a table layout, you can use only the table node. To display an internal table as a table in a form, a table node would be sufficient. Nevertheless, in many application areas accessing one internal table is not enough, because the application data is stored in several tables and depends on one another by means of foreign key relationsships.

For this reason, the Form Builder allows you to combine loops and tables:

  • A loop can have table nodes as inferior nodes - in this case, you display one table with each loop pass
  • A table can have loop nodes as inferior nodes - in this case, you can access both data from the table node and data from the loop node when displaying the table.

The second method is frequently used in the following way:

  1. You create a table node and use the Data tab to access your first internal table. In this node you create the table layout using line types.
  2. Instead of creating table lines as directly inferior nodes of the table node, you create a loop node as inferior node. On the Data tab of this node you can again read an internal table.
  3. As inferior nodes of the last loop node, you can create other loop nodes to read other internal tables.
  4. Finally, to display table cells, you create table lines as inferior nodes and select one of the line types defined in the table node. In the table cells, you can now access the data of the internal table that is read in the loop nodes.

During table output, you can access all globally defined fields as well.

If your internal table contains a value field that refers to a currency or quantity field in a different table, you must make this field known to the system before you can display it (see: Displaying Fields That Refer to Currencies or Quantities).