A relationship type is associated with two collection types. Origin collections conform to one collection type (the origin collection type), and destination collections conform to the other collection type (the destination collection type). The ItemInCollections collection contains the two collection definition objects that represent the origin and destination collection types.
Collection descriptor | Descriptor value |
Relationship Type | Collection-Contains-Items |
Source Is Origin | No |
Minimum Collection Size | Zero |
Maximum Collection Size | Two |
Sequenced Collection | No |
Deletes Propagated | No |
Destinations Named | No |
Case-Sensitive Names | Not applicable |
Unique Names | Not applicable |
Set variable = object.ItemInCollections(index)
The ItemInCollections collection syntax has the following parts.
Part | Description |
variable | A variable declared as a CollectionDef object. Receives the specified collection definition. |
object | An object expression that evaluates to a RelationshipDef object. |
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.ItemInCollections.Count. |
If the relationship type has not yet been connected to its origin and destination collection types, this collection can contain less than two collection types.