Friday, June 28, 2013

SharePoint 2013 – Display “Related Items” in Site Columns

A new Column type “Related Items” has been Introduced in SharePoint 2013. This is a very useful column from Business prospective. After you Create an Item you can simply add a reference to another Item or a document in any List\Library as a related entity to this Item using Related Items column.
If you navigate to list settings for your “Tasks” list you would notice a new Column “Related Items”. This is a new Site Column that is a Part of Task Content type by default.
Why would I use this Column?
This is a very useful column from Business prospective. When you create an Item you can simply add a reference (as Lookup) to another Item in same or different list or library as related entity.
Where is this column?
This Site Column is a part of Hidden group (“_Hidden”) by default and is not be listed in Site Columns. This however is a part of Task Content type by default. So all we need to do is to navigate to “Related Items” Site Column screen
and change the group from _Hidden to Whatever Custom group you want via the Tasks Content Type.
Lets look at the Steps -
Navigate to Site settings -> Site Content Types

Under List Content Types look for “Tasks”

Click on “Tasks” and you would see the following Columns with “Related Items” at the bottom.
Click on Related Items column and you would see something like below

Click on “Edit Site Column”

This is what you see here. Notice the _Hidden Group.

Click on Existing Group and then Change the Group this column belongs to. Click OK once done.


Next Navigate to Site Settings and select “Site columns”

In Site Columns select your group with Show Groups filter.


Now you can use this Site column in any list or Library.

How do you add “Related Items” Column in a list?
You can add this column in any list or library from the Site Columns using “Add from Existing Site columns” in a list. Again you need to first have this column display in “Site Columns” under one of the existing groups. “Related Items” is in _Hidden group in Site Columns by default. Follow the steps SharePoint 2013 – Display “Related Items”Column in Site Columns before you begin.
So once you see the Column in Site columns lets Navigate to the List where you need add the “Related Items” column.
Steps -
1. Navigate to the list and click on “List Settings” (under List tab).
2. In List Settings page click on “Add from Existing Site columns” under Columns.

3. Next Select the group where you are showing the Related Items column in Site Columns and then add it to the “Columns to add” box on right and click ok.

4. Now you have a “Related Items” column added to the list.

5. Next navigate to the list and click Create a new Item. You wont see this column in NewForm.aspx page.
Once you create a new Item click the call-up menu (…) and the View Item.

6. In View Page you would see “ADD RELATED ITEM”

7. Once you click on Add Related Item you would see a popup with list and libraries select the Item or document you need to as as related entity.

And here is the resulting Item.


No comments:

Post a Comment