6 Manage Data for Layouts in a Dependent Hierarchy
Sometime business objects exist in a multi-level hierarchy. For example, a Purchase Order might contain a header and a set of lines. That's a two-level hierarchy that can be managed with a Form-over-Table layout. But if each Purchase Order Line were to have one or more related Schedules, that's an example of a three-level hierarchy. For such multi-level business object hierarchies, the add-in enables coordinated operations across multiple "dependent" layouts.
When you click Download Data, Upload Changes, or Clear for a layout in a dependent hierarchy, the operation takes effect on all layouts in the hierarchy, starting with the primary layout, progressing to the next layout in the hierarchy, and continuing down until the last level in the hierarchy. When the operation is complete on all layouts in the hierarchy, the worksheet with the primary layout is made active again.
During a download operation, all items for all rows from the parent layout are downloaded at each level. (Any search specifications, if configured, apply only to the primary Form-over-Table layout.) For example, when Sheet 1 in your workbook contains Purchase Orders as the parent and Lines as the child (containing, say, 10 Lines) and Sheet 2 contains Schedules as the grandchild, the Schedules table is populated with all Schedule items for all Lines. If each of the 10 Lines had 2 Schedules, the Schedules table would download 20 Lines. With this download, you can update all Schedules and upload all the changes together.
Following a download, you can edit data much as you would a Table or a Form-over-Table layout. Remember though that when you create rows in the grandchild table, you need to identify the correct child row that it belongs to. Typically, one column in the grandchild table comes from the child table. For example, let's say the Schedules table in Sheet 2 includes a PO Line ID column that comes from the Lines table in Sheet 1. By typing the correct PO Line ID in the Schedules table for new create rows, the schedules will be properly associated with the PO Lines.
When updates are ready to be uploaded, the upload operation submits all pending changes across the hierarchy of layouts.
You can view details of the operation in the primary Form-over-Table layout's Status Viewer, which shows results for the primary layout as well as a summary for each layout in the dependent hierarchy, as shown in this example for a download operation:
Description of the illustration dependentlayout_download.png
Click each dependent layout to view additional details of the operation.