How to present a repeating group as tabs or columns on a harness or flow action form
Summary
You can use any of three approaches to present repeating structures derived from a Page Group
or Page List
property in a flow action form or work object form.
- Row Repeat — Called simply Repeat in V5.1, this control presents the embedded properties on each page of the Page List or Page Group property as a horizontal row. On the Harness, Section, and Flow action forms, use the the Repeat control (
) to build this presentation. (Beginning in V5.4SP2, this icon changed to
).
- Column Repeat — New in V5.4SP2, presents each page of the property as a column rather than a row. On the rule forms, use the Column Repeat control (
) to build this presentation.
- Tab Repeat — New in V54SP2, presents each page of the property as a labeled tab. At runtime, users click one tab to access the property values on one embedded page. Use the Tab Repeat control (
) to build this representation.
This article illustrates flow action forms that include a Column Repeat or Tab Repeat control.
These controls work in section rules as well as flow action rules. The steps are similar.
Suggested Approach
You can present the pages of a any Page List
or Page Group
structure using any of the three formats. They differ in runtime appearance and interaction (look and feel), but have the same functional capabilities. Choose whichever fits your data, design styles, and user community. Consider:
- The Row Repeat control may be preferable when the
Page LIst
orPage Group
property may contain a large number of pages (rows) but few properties (columns) per row. - The Column Repeat control may be preferable when the property may contain a large number of properties on each page, but not too many pages.
- The Tab Repeat control may be preferable when each page contains many properties and users can accomplish their task while limited to viewing only one page at a time.
For example, an order entry application uses a
Page List
property Orders to record the individual line items of an order. Each line item has four embedded properties:
- ItemName
- Quantity
- Price — Computed by a Declare Expression rule from Item Name. (The price is looked up interactively, through a CalculatedValues parameter on the HTML Property rule.)
- LineItemTotal — Computed by a Declare Expression rule from Price and Quantity (Also computed interactively.)
The Row Repeat control provides natural way to enter each line item at runtime. In V5.3 and V5.4, the runtime presentation of the Enter Order Items flow action is in rows:
(Since the Order property is a Page List
, not a Page Group
, the pages — rows —are identified internally on the clipboard by index number 1, 2, 3..., not by the ItemName property.)
Column Repeat
To present the Order as columns:
- Create a flow action rule. Open the Form tab. Select and delete the unneeded Layout control.
- Select and drag the Column Repeat control (
) and drop it on the form.
Click the magnifying glass icon to open the Column Repeat panel. Complete the Body tab, first identifying the class of the embedded pages, then the property (.Order in this example).
- Select the Allow Update check box to allow users to append new columns or delete columns at runtime.
- Click Apply.
- Add labels and input fields to the Column Repeat area. For column labels, you can check the optional Make Header check box to use a CSS style associated with the <TH> HTML element rather than the <TD> element. (Headers are typically read-only; check the Read Only check box. For input fields, make sure the Read Only check box is not selected.)
- Save the Flow Action form.
- Test. The pages are presented as columns. As with the Row Repeat approach, uses click the plus sign to add an element (column), or the trash can to delete an element (column).
Repeat Tab
The third alternative is Repeat Tab.
- Determine which
Single Value
property in the embedded page is to appear in the tab to identify the tab. (There is no requirement that this property have distinct, unique values.) In this example, the ItemName is used. - Create a section rule. For the Applies To key part, use the Page Class of the
Page LIst
orPage Group
property — in this case AlphaCorp-OrderData — not the work object type. - The section contains a single layout. Using ordinary operations on the Layout tab, add in the labels and input fields that are to form the body of the tab — in this case Quantity, Price, and Total.
- Save the Section form.
- Create a flow action rule. Open the Form tab. Select and delete the unneeded Layout control.
- Select and drag the Tab Repeat control (
) and drop it on the form.
Click the magnifying glass icon to open the Tab Repeat panel. Complete the Body tab, first identifying the class of the embedded pages, then the property (.Order in this example). The values in this example are the same as the values in the Repeat Column example above.
- Click and drag a TextBox control to the tab itself. Complete the Cell properties panel to label it with the property value you selected in step 1 above.. In this example, the ItemType property uses the PromptSelect HTML Property rule, as in the previous Repeat Column example.
- The body of the Tab Repeat contains a two fixed cells. Leave the right cell empty. Drag a section control (
) and drop it in the left cell. Identify the section rule you created in step 2 above.
- Adjust the cell boundaries to make all fields visible. Save the Flow Action form.
- Test. Ensure that the user can append tabs and delete tabs.
Note: For a more conventional design , use two properties. Place a copy of ItemValue property marked as read-only in the tab itself, and the drop-down list in the body of the tab.