The following exercise demonstrates how to collect data (tabular data) from several screens. This isn’t the only way of doing it, but for this common scenario, of a scrollable table, it is the easiest.
Create a path procedure which collects all customer information as output variables and displays the output on the first customer detail web page, preferably, using tabs.
Navigate to a screen with table formatted data (BrowseCustomers, Browseproposals).
Identify the screen if you haven’t already done so.
Map all fields, single fields as well as multiple fields which represent the table’s columns.
In the Table tab, create a new table. Delete unnecessary columns and change column captions to be more user-friendly.
Select Primary key columns. These would usually be columns with unique values.
Record a Path Procedure that scrolls through the table until it reaches an “End of Data” (or similar) message on the host screen.
Open the path for editing, click the step where the path is scrolled and open its output tab.
Select all the required fields from the table entity (hold CTRL and click for multiple selection). Then right click the selection and click “New Data Structure”. A dialog box is displayed. Enter the name of the new data structure and click OK. You have just created a Structure that represents one row in the host table.
Add an additional attribute to the data structure in which database information will be stored.
Click the “Flow Procedure” node and open the output tab. Click Add structure, and name the variable. Select the newly created Data structure from the “type” Combo. Finally, check the “array” checkbox to make your output variable actually represent a table (collection of rows).
Add a screen mapper node after the “scroll down” step. Select the relevant screen and then drag the table node onto the newly added variable.
Use the “loop for each” to cycle through the output and run the previously created DB flow procedure to gather additional data about each record (figure I). Map the Procedure output to the data structure (figure II). Make sure you map it to the correct record (Figure III).
Finally, associate the procedure with a procedure group. Create a new procedure group in the repository then add the new procedure to the “Assigned Procedures” box by:
Clicking the “Add Procedure” button and selecting the procedure from the dialog.
Dragging the procedure from the repository on to the “Assigned Procedures” box.
Accompanying movies: