ViewId

This attribute is used to set the View that will provide options when linking records using Relationship fields.  If a ViewId is not used the table indicated in the TableId attribute of the <View> element will be used for linking options.

Example:
<View Id="Heroes" TableId="Contacts">
    <Fields>
        <Relationship Id="Enemies" TableId="Contacts" ViewId="Villains" />
    </Fields>
</View>

<View Id="Villains" TableId="Contacts">
    <Fields>
        <Relationship Id="Enemies" TableId="Contacts" ViewId="Heroes" Reciprocal="true" />
    </Fields>
</View>

In the example above, Contacts are defined in "Heroes" and "Villains" Views.  Each Views defines a Relationship field of enemies.  In the "Heroes" View - the ViewId="Villains" is used so the selection list when choosing Enemies will display records from the Villains View.

For Villain records, ViewId="Heroes" is used so Enemies field will display options from the Heroes View.

If ViewId="Villains" were to be removed from the <Relationship> tag in the Heroes View - the options for choosing Enemies would include all records in the Contacts Table (from the attribute: ><View Id="Heroes" TableId="Contacts">).

This list would include Heroes, Villains, and possibly other Contact Types such as Volunteers, Authors, and Baby Seals.