- Adding the Parent-Child configuration web part to a page
- Activating the Parent-Child feature
- Creating Parent-Child list relationships
- Linking Child items to a Parent item
- Changing the child display grid layout
- Defining Auto-Fill columns
- Deleting Parent-Child relationships
Adding the Parent-Child configuration web part to a page
The Parent-Child web part must be added to a Wiki or Web Part page in order to activate the feature, define Parent-Child relationships, and other actions. The Parent-Child Web Part is activated and managed on per-site basis.
- Go to the desired page.
- If the page is not already in edit mode, click Edit at the top right of the page.
- Click the Insert tab, and then click Web Part.
- Under Categories, select Miscellaneous, select Parent-Child and then click Add.
- When you have finished, on the Formatting Text or Page tab, click Save.
The Web Part is available on the page and ready to be activated.
Activating the Parent-Child feature:
Parent-Child relationships are managed per site from an activated instance of the Parent-Child web part. The Web Parts functionality is turned off by default and must be turned on before relationships between SharePoint lists and libraries can be defined.
- Click the Off button to turn on the Web Part in the site.
On initial activation the following lists are created on the site:
- List stores the relationships displayed in the Parent-Child Relationship grid.
- List is accessed when the Define Auto-Fill Columns box is clicked.
The Web Part is now ready for you to use.
Creating Parent-Child list relationships
Connections between SharePoint lists and libraries are managed in the Parent-Child Relationships grid. Each row in the grid represents a relationship between two SharePoint lists found on the local site. Parent-Child relationships can be one-to-one or one-to-many.
- Go to the site page that has the Parent-Child Web Part added and activated.
- In the Parent-Child Relationships grid, click the open row under Parent List Name.
- Select the desired Parent list from the available SharePoint lists and libraries displayed in the drop-down box.
- On the same row, click under the Child List Name header and select the desired Child list.
- Repeat as necessary to define the desired relational hierarchy.
The following changes are seen after a Parent-Child relationship has been created:
- Title link for an item will open its default display form in a new slide-in panel.
- Default display and edit forms show any child lists or libraries that are related to the parent. Any child items associated with the parent item are shown.
- When opened, child items show their relationship ancestry in the grey panel on the left, and the breadcrumb trail under the ribbon.
- A list view called “parent-child” is automatically created in each list or library identified as a "child" in the relationship.
- A single line of text field named “PID” is automatically added to each list/library identified as a "child" in the relationship.
Linking Child items to a Parent item
Items in a child list are associated with an item in a parent list or library using a relationship key (PID) that is automatically created by Parent-Child.
There are two ways to associated child items with a parent item in an associated list or library:
- Create a new child from the parent item
- Link already created child items to the parent item.
Create a new list item
- Navigate to the Parent list or library.
- Click the Title of the desired parent item.
- Click the Add new icon () next to the desired child and select Create New Child.
- Complete the fields in the New form of the child list.
- Click Save. You are returned to the Parent item’s display form.
Link existing child list items
- From the Display or Edit form of the desired parent item, hover over the Add new icon () next to the desired child list or library name.
- Click on Link Existing Items.
- Select the items you want to associate with the parent from the displayed orphaned items.
- Click Add Selected Items.
Changing the child display grid layout
When a parent item is opened, the customized view/edit form displays child items from child lists associated with the parent.
The automatically-created parent-child view associated with the child list determines which columns are displayed in the grid.
For example, the columns shown in the Resources grid (above) are governed by the Resource list’s parent-child view.
Use the following steps to change the view, such as adding or removing columns, and changing the column display order.
- Go to the list or library where you want to change the default parent-child view and click the List tab.
- Select parent-child from the Current View drop-down list.
- Click Modify View.
- Make your changes, and then click OK at the bottom of the page. The changes are reflected in the child grid.
In the image above the column, Department, was added to the Events list (child) to allow sibling relationships with the Department list (parent) to be easily identified.
While the field could be manually populated every time a new child item is created, Parent-Child simplifies this process and lets you automatically populate fields in the child list with information from the parent list.
- Click the Define Auto-Fill Columns box in the Parent-Child Web Part.
- In the SPC_PC-LinkedColums list, click edit to enter the Quick Edit view.
- Enter information as you would is a spreadsheet.
- List/Library Name – Name of the child list or library
- Column Name – Column in the child list or library to be populated with content from the parent item.
- Linked List/Library Name – Name of the parent list or library
- Linked Column Name – Column in parent list or library that contains information that should be copied to the child item.
- When you’re finished entering the information, click Stop editing this list.
The identified field will be automatically populated when a New child item is created.
Deleting Parent-Child relationships
- From the Parent-Child Relationship grid, click the X on the row defining the unwanted relationship.
- Click Delete in the confirmation dialog box.