Managing Collection Elements

These topics provide an overview of managing collection elements and discuss how to:

  • Add collection elements.

  • Define collection element properties.

Only a collection item that is a primitive or compound data type can be added to a collection element. A collection can have unlimited collections as siblings.

Use the Add Collection Child or the Add Collection Peer page, depending on whether you want to create a collection child or collection peer element. The Add Collection Child page and the Add Collection Peer page share the same object page name: IB_LOGICALCOLL_SEC.

You access the Add Collection Child and Add Collection Peer pages using the action toolbar on the Document Builder - Documents page.

Image: Add Collection Child page

This example illustrates the fields and controls on the Add Collection Child page. You can find definitions for the fields and controls later on this page.

Add Collection Child page

To add a collection element:

  1. Access the Document Builder - Documents page (PeopleTools > Documents > Document Builder).

  2. In the document tree, click the element to which to add a collection child or collection peer element.

  3. On the action toolbar, do one of the following:

    • Click theAdd Collection Child button to add a collection child element.

    • Click the Add Collection Peer button to add a collection peer element.

    The Add Collection Child or Add Collection Peer page appears, depending on the element you added.

  4. In the Element Name field, enter a name for the collection element.

  5. Click the OK button.

    The Document Builder - Documents page appears, and the new collection element appears in the document tree. Note that the collection element icon that appears on the toolbar also appears to the left of the collection element in the document tree.

After you add a collection child or collection peer element to a document, the collection element properties appear on the right side of the Document Builder - Documents page.

Image: Document Builder - Document page

The following example shows the properties for a collection child element called order_status.

Documents - Document page

You can define the following collection element properties:

Field or Control

Definition

Element Name

Name of the element as it will appear in the XML document.

Required

Select the check box to make the element required.

Min Occurrence (minimum occurrence)

The minimum number of instances when populating the document definition with data.

As an example, entering a 0 (zero) means that you do not have to populate the collection.

Enter the minimum number of occurrences of the collection element in the document.

The default value is 1.

Max Occurs (maximum occurrence)

This field appears only if the Unbound Maximum field is cleared.

Enter the maximum number of occurrences of the collection element in the document.

Unbound Maximum

Select the check box to include an unlimited number of occurrences of the collection element in the document.

By default, this option is selected.

Sequence

The system assigns this read-only field. The sequence number is used for indexing with the PeopleCode API for documents.